Hello,
When opening a RadWindow via .setUrl and .show(), two postbacks are envoked on the destination page, one for .setUrl and one for .show().
Is it possible to only cause one postback?
Below is sample code:
I cannot use navigateUrl of RadWindow because I need to pass querystring values.
I cannot use radopen() function because of styling issues.
RadWindowDoublePostback.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadWindowDoublePostback.aspx.cs" Inherits="WebApplication1.RadWindowDoublePostback" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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>
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<asp:Button Text="ShowWindow" runat="server" ID="Button1" OnClientClick="showWindow(); return false;"/>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
<telerik:RadWindow ID="RadWindow1" runat="server" ReloadOnShow="true">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
<script type="text/javascript">
function showWindow() {
//var oWnd = radopen("RadWindowCloseDialog.aspx", "RadWindow1");
var oWnd = $find("<%= RadWindow1.ClientID %>");
if (oWnd) {
oWnd.setUrl('<%= ResolveUrl("RadWindowDoublePostbackDiaolog.aspx") %>');
oWnd.show();
}
}
</script>
</div>
</form>
</body>
</html>
RadWindowDoublePostbackDiaolog.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadWindowDoublePostbackDiaolog.aspx.cs" Inherits="WebApplication1.RadWindowDoublePostbackDiaolog" %>
<!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>
RadWindowDoublePostbackDiaolog
</div>
</form>
</body>
</html>
Is it possible to only cause one postback when I open the window?
Thanks!