Hi All,
DestroyOnClose seems to be one of those topics that reoccurs but never really gets resolved.
I am suffering from the continued caching problem regardless of the DestroyOnClose variable. The thing that has ended most other threads on this has been a Telerik support person being unable to replicate or asking for an example. So I have done one up. The simplest I can think of. Since I cannot attach the project here, please see the code below.
Using this example :
MainPage.aspx.cs
TestPopup.aspx
TestPopup.aspx.cs
DestroyOnClose seems to be one of those topics that reoccurs but never really gets resolved.
I am suffering from the continued caching problem regardless of the DestroyOnClose variable. The thing that has ended most other threads on this has been a Telerik support person being unable to replicate or asking for an example. So I have done one up. The simplest I can think of. Since I cannot attach the project here, please see the code below.
Using this example :
- Start the solution using MainPage as the start page
- Click on the Launch1 button
- A modal popup window will appear, with the string "Launch1" on the second line - as expected.
- Close the window.
- Now click on the Launch2 button.
- The modal reappears, bearing the same content - is should say "Launch2" in the text.
I am using 2010.3.1109.40 version of the Telerik.Web.UI.
Please help me out with this.
Thanks,
Steele.
MainPage.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainPage.aspx.cs" Inherits="TestTelerikWebApp.MainPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="buttLaunch1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="buttLaunch1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="buttLaunch2"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="buttLaunch2" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadWindowManager ID="RadWindowManager1" runat="server" DestroyOnClose="True"> </telerik:RadWindowManager> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function OpenMyWindow() { var oManager = null; if (typeof (GetRadWindowManager) == 'function') // there is a radwindowmanager in scope, so use it oManager = GetRadWindowManager(); var oWnd = oManager.open('TestPopup.aspx', 'This is a test'); } </script> </telerik:RadCodeBlock> <div> <asp:Button ID="buttLaunch1" runat="server" Text="Launch1" onclick="buttLaunch1_Click" /> <asp:Button ID="buttLaunch2" runat="server" Text="Launch2" onclick="buttLaunch2_Click" /> </div> </form> </body> </html> MainPage.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TestTelerikWebApp { public partial class MainPage : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void buttLaunch1_Click(object sender, EventArgs e) { Session["ErrorInfo"] = "Launch1"; RadAjaxManager1.ResponseScripts.Add("OpenMyWindow();"); } protected void buttLaunch2_Click(object sender, EventArgs e) { Session["ErrorInfo"] = "Launch2"; RadAjaxManager1.ResponseScripts.Add("OpenMyWindow();"); } } } TestPopup.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPopup.aspx.cs" Inherits="TestTelerikWebApp.TestPopup" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> I am a popup<br /> <asp:Label ID="lblMessage" runat="server"></asp:Label> </div> </form> </body> </html> TestPopup.aspx.cs
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TestTelerikWebApp { public partial class TestPopup : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { lblMessage.Text = Session["ErrorInfo"].ToString(); } } }