ASP.Net - Second Child window to open on top of Parent window

Oct 18, 2013
Reaction score

I have a parent window (ParentMain.aspx), I was able to open a new window (SampleChild1.aspx) from the parent window using below script on aspx.cs:

string strScript = string.Format("'/Sample.UI/SampleChild1.aspx','window','toolbar=no,hotkeys=no,location=no,directories=no,menubar=no,scrollbars=yes,status=1,resizable=0,width=600,height=500');");
ScriptManager.RegisterStartupScript(this, this.GetType(), "nothing", strScript, true);

After the SampleChild1.aspx is opened, now I have two windows open
1) ParentMain.aspx
2) SampleChild1.aspx
Whenever I click the samplechild1.aspx link, it open up samplechild1 window. No issues.

I want the below flow to work.
From samplechild1.aspx, I have to open samplechild2.aspx from aspx page and this samplechild2.aspx should not open as a another new window or on top of samplechild1.aspx, it should open on the top of ParentMain.aspx page

Please tell how to set the samplechild1.aspx open on ParentMain.aspx.

Kindly provide a solution at the earliest.


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question