c# – 如何避免Radwindow Open上的回发?
作者:互联网
我正在使用radgrid来填充表格.打开单击后将打开radwindow.
<telerik:RadButton ID="create" Text="Open radwindow" runat="server" OnClientClicking="Open" AutoPostBack="false" CausesValidation="false" Skin="WebBlue" Font-Bold="true" Height="22px" Width="97px" ToolTip="Click here to Create a new meeting">
</telerik:RadButton>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" EnableViewState="false"></telerik:RadWindowManager>
<telerik:RadWindow id="radCreatePopup" NavigateUrl="page2.aspx" Top="30" OnClientShow="OnClientshow" Left="100" VisibleStatusbar="false"
Modal="true" CenterIfModal="true" OnClientClose="Close" runat="server" Width="770px" Height="390px" Skin="WebBlue" Behaviors="Resize, Close, Move, Reload" ReloadOnShow="True" />
用于打开和关闭的Javascript代码
(function (global, undefined) {
var button = null;
function OnClientshow(sender, eventArgs) {
}
function Open() {
var oWnd = $find("<%= radCreatePopup.ClientID %>").show();
}
global.OnClientshow = OnClientshow;
global.Open = Open;
})(window);
function Close() {
var oWnd = $find("<%= radCreatePopup.ClientID %>").Close();
rebind();
return false;
}
一切正常,但如果我打开Radwindow,父页面将一次又一次地回发.
解决方法:
由于您使用的是ReloadOnShow =“True”,因此每次都会重新加载.所以删除代码并运行它.
标签:c,asp-net,postback,telerik,radwindow 来源: https://codeday.me/bug/20190708/1399621.html