This is a migrated thread and some comments may be shown as answers.

Over discussed problem: RadWindow page loads twice

3 Answers 168 Views
Window
This is a migrated thread and some comments may be shown as answers.
dorina
Top achievements
Rank 1
dorina asked on 31 Dec 2010, 09:31 AM
Hello, yes, I know the problem is overdiscussed, but I tried all the workarounds proposed by you, still doesn't work for me..

I set ReloadOnShow = false, put the code do disable cash in PreRender handler :

Response.Cache.SetCacheability(

HttpCacheability.NoCache);
Response.Cache.SetNoServerCaching();
Response.Cache.SetNoStore();
Response.AppendHeader(
"Pragma", "no-cache");
Response.Expires = -1;
Response.CacheControl =
"no-cache";

But the page still loads twice.

 

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 03 Jan 2011, 12:56 PM
Hello dorina,

Please provide more details about your exact setup:
  1. The declaration of the RadWindow / RadWindowManager that you are using
  2. The code with which you are opening the RadWindow.

Regards,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
dorina
Top achievements
Rank 1
answered on 03 Jan 2011, 01:16 PM
<input id="hdnShowNotification" runat="server" type="hidden" value="0" />
  
<telerik:RadWindowManager ID="RadWindowManager1" VisibleStatusbar="false"
runat="server" Skin="Default" EnableShadow="true" ShowContentDuringLoad="false"
ReloadOnShow="false">
<Windows  
<telerik:RadWindow ID="notificationWindow" runat="server"
Behaviors="Close, Move, Resize"
NavigateUrl="CustomNotification.aspx" Width="630" Height="300"
Title="Notifications" 
Modal="false"
ShowContentDuringLoad="false" ReloadOnShow="false">
  
</telerik:RadWindow>  
</Windows>  
</telerik:RadWindowManager>
  
<script type="text/javascript">  
  
// Attach a handler to the load event.
  
Sys.Application.add_load(clactivate);   
  
function clactivate(){    
    var showNotif = $get("<%= hdnShowNotification.ClientID %>");   
    if(showNotif != null && showNotif.value == "1")   
    {
        var WinId = "Win" + Math.random().toString();   
        var Url = "CustomNotification.aspx?wid=" + WinId;   
        var oManager = GetRadWindowManager();   
        var oWnd = oManager.GetWindowByName("notificationWindow");   
        if (oWnd){   
            oWnd.SetUrl(Url);   
            oWnd.Show();   
        }
    } 
  
</script>

I set a hidden field a value ("1") in PageLoad event if I need to show the window :

if (!IsPostBack)
{
     //show notifications
     if (condition to show)
     {
         hdnShowNotification.Value = "1";
    }
}
0
Georgi Tunev
Telerik team
answered on 03 Jan 2011, 02:55 PM
Hello Dorina,

I tried to reproduce the problem, but everything worked as expected and the content page was not loaded twice (i.e. Page_Load was called only once). This leads me to believe that the problem is somewhere else, but to be able to help, I need to get a better view over your exact setup.
Please open a support ticket and send me a sample project that isolates the problem (this blog post will help you in this task) and I will check it right away.

Regards,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Window
Asked by
dorina
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
dorina
Top achievements
Rank 1
Share this question
or