Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi everyone. I have a page in asp.net. 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:
1.
Response.Redirect("InitialPage.aspx");
2.
Server.Transfer("InitialPage.aspx");
3.
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 Smile | :)
Posted 25-Feb-13 3:51am
Edited 25-Feb-13 4:32am
v2
Comments
ryanb31 at 25-Feb-13 8:54am
   
javascript: history.go(-1); You can try that. It's like clicking the back button.
Rate this: bad
good
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]?
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Thank you so much for all your help guys. Smile | :)
 
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.
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 7,448
1 OriginalGriff 5,996
2 Peter Leow 4,292
3 CHill60 2,858
4 Mika Wendelius 2,850


Advertise | Privacy | Mobile
Web01 | 2.8.150224.1 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2015
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