help please,
i wish to know the code to redirect to an exsisting open web page from another web page(ie child page want to be closed and control want to be come to parent web form which is already previously opened)

Hi Shine,

You need to used PopUp Windows OTHERWISE you will need to use some State management technique(like QueryString, Session etc) to achieve this.

Let me know if you were looking into some other way of solving this.

Thanks,
Chithra

I assume that you opened a popup window from a parent page. If you want to close the poup window, use window.close or self.close javascript functions.

Hi Shine,

You need to used PopUp Windows OTHERWISE you will need to use some State management technique(like QueryString, Session etc) to achieve this.

Let me know if you were looking into some other way of solving this.

Thanks,
Chithra

hello,
i wish to popup a new webpage from exsisting web page
using href _blank option (that I know) and navigate back to the called web page ie parent web page(without opening the same parent web page one more time) please help me

In your Default.aspx add a button and put this code in its button_Click event to to see a demo PopUp Window.

System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append("<script>");
        sb.Append("window.open('PopupWindow.aspx', '', '');");
        sb.Append("</script>");

        Page.RegisterStartupScript("test", sb.ToString())

After that you need to create a PopupWindow.aspx page
here add a button,To close PopupWindow.aspx
the following code on button click will do the job

System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append("window.opener.document.forms[0].submit();");
        sb.Append("window.close();");

        ClientScript.RegisterClientScriptBlock(this.GetType(), "CloseWindowScript",
        sb.ToString(), true);

Let me know if you are expecting much more functionality

Hello,
For each Response .redirect its opening new new copies of same web page .i don't need that i want make this to same already opened parent page.Please help me

In your Default.aspx add a button and put this code in its button_Click event to to see a demo PopUp Window.

System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append("<script>");
        sb.Append("window.open('PopupWindow.aspx', '', '');");
        sb.Append("</script>");

        Page.RegisterStartupScript("test", sb.ToString())

After that you need to create a PopupWindow.aspx page
here add a button,To close PopupWindow.aspx
the following code on button click will do the job

System.Text.StringBuilder sb = new System.Text.StringBuilder();
        sb.Append("window.opener.document.forms[0].submit();");
        sb.Append("window.close();");

        ClientScript.RegisterClientScriptBlock(this.GetType(), "CloseWindowScript",
        sb.ToString(), true);

Let me know if you are expecting much more functionality

hai all users,
plz help me to solve this problem.
consider there is one web page let we call it Master there is one field (txtenter code)
and link button near (by click) it will pop up anothere webpage let we call it child which contain a gried showing all the details(code,name so it will be easy for user to select) ,if user click on select linkbutton on the gried of child web page (response.redirect take place and i need to have the code in the master web page field(txtenter code))
The problem i am facing is the response.redirect is opening a new webpage (rather than going to already opened master its opening a new web page . so all the data i entered in the master page is useless and the master page is also there below these two pages).
please send me the code which help me to do my work.

Comments
It's not fair.
This is the fourth time you have asked this question

Hi,
Your problem can be solved by using sessions.
store the value you have entered in the textbox in a session variable and when the master page opens for the second time
just insert the valuein the session variable into the text box.

I hope this would solve your problem.

This article has been dead for over six months. Start a new discussion instead.