Load previous page with it's viewstate

2 posts, 0 answers
  1. ShawnAugust
    ShawnAugust avatar
    131 posts
    Member since:
    Apr 2007

    Posted 18 Jan 2008 Link to this post

    Hello:

    I know that plenty of people have tried to address this but I haven't found a consensus on how to resolve this problem:

    Reloading a previous page with its view state.

    A real world example:

    A search page that displays search results. Click on an item and the application brings the user to a details page. A Back To List button exists and when clicked, the user is brought back to the search page with its previous state in context.

    My application:

    Page 1 displays records within a DataGrid and has various controls. A button redirects the user to Page 2 using cross-page postback.

    Page 2 displays various data from Page 1 using .NET's PreviousPage object. A button redirects the user back to Page 1 using Response.Redirect.

    There are a million and one ways to to do this but I am trying to have Page 1 re-display with the view state that it had before leaving for Page 2. The same data loaded in the controls, the same selections made in the controls, the same page of records loaded in the DataView.

    Currently, it just re-loads Page 1 with it's initial values.

    I've tried JavaScript history and looking into overwriting Page 1's view state but ViewState is not available within the PreviousPage object.

    Does anyone have some advice?
  2. ShawnAugust
    ShawnAugust avatar
    131 posts
    Member since:
    Apr 2007

    Posted 21 Jan 2008 Link to this post

    TTT
Back to Top