开发者

How to stop Telerik RadWindow from always reloading on the next PostBack

开发者 https://www.devze.com 2022-12-31 01:15 出处:网络
I am invoking a RadWindow as a dialog in my web page. I am invoking from code-behind since I need to pass some parameters:

I am invoking a RadWindow as a dialog in my web page. I am invoking from code-behind since I need to pass some parameters:

radWindow1.NavigateUrl = url + "?England,Germany,France";

radWindow1.VisibleOnPageLoad = true;

This works great, however it keeps reloading on each and every postback.

How can I stop the RadWindow from reloading? I don开发者_如何学C't mind code-behind or JavaScript to achieve this.


You can use the IsPostBack property of the page to see if this is the first time it is loading or a postback and set the VisibleOnPageLoad property accordingly:

    radWindow1.VisibleOnPageLoad = !Page.IsPostBack;

This way the window will open only if IsPostBack is false - i.e. when the user first opens the page.


Make sure that EnableViewState is set to false. Since RadWindow ASP.NET AJAX Q32009, when a RadWindow is declared in a RadWindowManager, it preserves its ViewState which was not so in previous versions.

0

精彩评论

暂无评论...
验证码 换一张
取 消