I want to navigate to the different page on click of button which is on modal popup.When I do this through my existing code its opening the new page to same popup window , i want to open a new page to parent page and close modal popup.
default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Pages_Default" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<!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>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" style="z-index:8000" Behaviors="Close,Move,Reload"
Modal="true" Animation="None" ShowContentDuringLoad="true" VisibleOnPageLoad="true"
Skin="WebBlue">
<Windows>
<telerik:RadWindow
OpenerElementID=""
Width="820px"
Height="540px"
NavigateUrl="RoleList.aspx"
Runat="server"
Id="Radwindow1"
VisibleStatusbar="false" ClientCallBackFunction="CallParentRole" >
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
</form>
</body>
</html>
default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Pages_Default : QMSPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
Rolelist.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RoleList.aspx.cs" Inherits="RoleList" %>
<!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>Untitled Page</title>
<script type="text/javascript">
function CallParentRole(radWindow, returnValue)
{
document.getElementById("Button1").click();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<table border="1" style="width:200px;">
<tr>
<td>
<asp:RadioButtonList ID="rblRole" runat="server">
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td>
<asp:Button ID="btnGo" runat="server" Text="Go" onclick="btnGo_Click" />
</td>
</tr>
</table>
</form>
</body>
</html>
RoleList.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class RoleList : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
MembershipUser user = Membership.GetUser();
if (user == null)
Response.Redirect("~/login.aspx");
string[] str = Roles.GetRolesForUser(user.UserName);
if (str.Length == 0)
{
Response.Redirect("~/Logoff.aspx");
}
for (int i = 0; i < str.Length; i++)
{
ListItem li = new ListItem();
li.Text = str[i].ToString();
if (i == 0)
{
li.Selected = true;
}
rblRole.Items.Add(li);
}
}
}
protected void btnGo_Click(object sender, EventArgs e)
{
Session["RoleName"] = rblRole.SelectedItem.Value;
Response.Redirect("~/Pages/default.aspx");
}
}
can any one help me in this... :)