Link to home
Start Free TrialLog in
Avatar of Donna Kainer
Donna KainerFlag for United States of America

asked on

How do you refresh a page in codebehind

PageA has a repeater which displays some number of rows from a table. After the repeater on PageA I have a textbox and an "Add" button. I enter some text into  the textbox and click on the "Add" button. In the codebehind for the "Add" button I insert the data from the textbox into the table used by the repeater and then I open PageB which displays the detail information. At some point in the codebehind for the "Add" button I need to refresh PageA so that the new information I inserted into the table is displayed by the repeater and then go to PageB.

My code in the Add button is:

Response.Redirect(Request.RawURL)

ClientScript.RegisterStartupScript(Me.GetType, "popup", "window.open('CustomerDetailForm.aspx?Cust_Code=" + strCustCode + "','_blank','menubar=no')", True)

Whatever is first in the code above happens but not the second.

How do I refresh PageA and also get to PageB?
ASKER CERTIFIED SOLUTION
Avatar of Member_2_4913559
Member_2_4913559
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Donna Kainer

ASKER

This is exactly what I needed. It is so simple I don't know why I did not think of it myself.

There is not a problem with pageB. I only included it so that the whole picture could be seen. Thanks.