954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

web page

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)

shine_jose
Light Poster
48 posts since Jul 2009
Reputation Points: 4
Solved Threads: 2
 

can u make ur question clear/?

kameswari
Junior Poster in Training
76 posts since Sep 2008
Reputation Points: 13
Solved Threads: 16
 

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

chithrasujith
Newbie Poster
21 posts since Jul 2009
Reputation Points: 10
Solved Threads: 4
 

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.

Ramesh S
Posting Pro
583 posts since Jun 2009
Reputation Points: 165
Solved Threads: 113
 

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

shine_jose
Light Poster
48 posts since Jul 2009
Reputation Points: 4
Solved Threads: 2
 

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

chithrasujith
Newbie Poster
21 posts since Jul 2009
Reputation Points: 10
Solved Threads: 4
 

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

shine_jose
Light Poster
48 posts since Jul 2009
Reputation Points: 4
Solved Threads: 2
 

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.

shine_jose
Light Poster
48 posts since Jul 2009
Reputation Points: 4
Solved Threads: 2
 

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.

praveenkumarm
Newbie Poster
19 posts since Aug 2009
Reputation Points: 10
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You