Click here to Skip to main content
13,147,812 members (40,163 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi everyone. I have a page in It initially contains a label, textbox and button. User must input correct value in textbox and then click button. The button event will display two additional panels with more controls. There is a grid in one of these panels and it takes the user to a new page. I do more work here and then want to return to the previous page for more working. Problem is, my page only displays the initial controls and not the modified panels. How can I maintain that work once I come back to it?

I currently have tried:


ViewState["UrlRef"] = Request.UrlReferrer; //Saves the Previous page url in ViewState in Page_ Load. 
//if (ViewState["UrlRef"] != null) //Check if the ViewState contains Previous page URL
            //    Response.Redirect(ViewState["InitialPage.aspx"].ToString());//Redirect to Previous page by retrieving the PreviousPage Url from ViewState.

But with no success. Still same result. Would really appreciate any help that you can give me. Thank you in advance :)
Posted 25-Feb-13 2:51am
Updated 25-Feb-13 3:32am
ryanb31 25-Feb-13 8:54am
javascript: history.go(-1); You can try that. It's like clicking the back button.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Can you open new page in new window and update opener using javascript as shown [here]?
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Thank you so much for all your help guys. :)

I got my own solution by simply passing an ID from the gridview as a session variable through to the next page and getting it back again when I redirect to that Initial page. Doing so, made me get all the changes I've made before and display the page with all the changes. . .Don't know if anyone understands this, but it's working for me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100