I have the following case:
I have a gridview on my page :
page1.aspx
I open another page(page2.aspx
) through that gridview in a rad window then after that,through some button on page2.aspx
i open the last page (page3.aspx
) in a rad window
also.
all these steps are performed through server side code :
protected void OpenNewWindow(string url, int width, int height, int mode)
{
RadWindow newWindow = new RadWindow();
newWindow.NavigateUrl = url;
newWindow.VisibleOnPageLoad = true;
newWindow.KeepInScreenBounds = true;
newWindow.Skin = "Metro";
if (width > 0)
{
newWindow.Width = width;
}
if (height > 0)
{
newWindow.Height = height;
}
newWindow.VisibleStatusbar = false;
if (mode == 0)
{
{
}
//newWindow.OnClientClose = "OnChildWindowClosed";
newWindow.DestroyOnClose = true;
newWindow.InitialBehaviors = WindowBehaviors.Maximize;
}
RadWindowManager1.Windows.Add(newWindow);
}
What i want to do is :
when clicking on a specific button on my (page3.aspx
) close it and its parent page2.aspx
.
How to do this (server side)?
I try this :but it just closes the child page3.aspx
i want to close the parent page2.aspx
also ?!
protected void Button1_Click(object sender, EventArgs e)
{
((RadAjaxManager)this.Parent.FindControl("RadAjaxManager1")).ResponseScripts.Add("CloseModal();");
RadAjaxManager1.ResponseScripts.Add("CloseModal();");
}
page2.aspx
has a button when i click on it openspage3.aspx
– Ulu