Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2008, 05:43 PM
Registered User
 
Join Date: Jan 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to SAgosto
Default Load previous page with it's viewstate

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?

 
Old January 22nd, 2008, 05:03 AM
Friend of Wrox
 
Join Date: Oct 2007
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi
Default

You have to use cookie.
for example user type some criteria in search text box,
do create one cookie with name as pagenamesrchtext, value as entered value
whenever search page is loaded, use that cookie while loading search page


urt





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to expire previous page johnsonlim026 ASP.NET 1.0 and 1.1 Basics 6 May 22nd, 2009 12:05 PM
content page viewstate value in Master Page cbe_seenu ASP.NET 2.0 Professional 0 August 1st, 2006 01:01 AM
Save and Load viewstate trex450 ASP.NET 1.0 and 1.1 Professional 0 October 13th, 2004 09:31 AM
Checking Previous Page shs BOOK: Beginning ASP.NET 1.0 2 September 23rd, 2004 11:01 PM
how do i get the first viewstate of the page ... alyeng2000 ASP.NET 1.0 and 1.1 Basics 5 January 19th, 2004 03:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.