473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Maintain state between 2 pages.

I have an application which consists of 2 web forms. On the first
page I have a datagrid with paging and sorting turned on. I also have a
textbox which allows me to filter the data in the grid and narrow down
the results. The grid also contains a column with hyperlinks which when
clicked should invoke the second page which displays details about the
current row.

I call the second page with Server.Transfer("second.aspx"). On this
page I have a button which allows me to navigate back to the first
page.

My question is the following: Is there an easy way to maintain the
state of the first page (sort direction - asc., desc., sort column,
filter text, current page of the datagrid) during the trip to the
second page and be able to reconstruct it the way I left it or should I
use the Session object to store all the information?

This could be a common issue when implementing web *wizards* with
next> and <previous buttons. How to maintain page state in such a
scenario?

Any suggestions are welcome. Thanks in advance.

Jan 2 '06 #1
1 2149
You will probably need to use Session State. However, if your hyperlink opens
the second page in a new browser window instead of using Server.Transfer, you
won't need to, since the first page will still be open.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"da************@hotmail.com" wrote:
I have an application which consists of 2 web forms. On the first
page I have a datagrid with paging and sorting turned on. I also have a
textbox which allows me to filter the data in the grid and narrow down
the results. The grid also contains a column with hyperlinks which when
clicked should invoke the second page which displays details about the
current row.

I call the second page with Server.Transfer("second.aspx"). On this
page I have a button which allows me to navigate back to the first
page.

My question is the following: Is there an easy way to maintain the
state of the first page (sort direction - asc., desc., sort column,
filter text, current page of the datagrid) during the trip to the
second page and be able to reconstruct it the way I left it or should I
use the Session object to store all the information?

This could be a common issue when implementing web *wizards* with
next> and <previous buttons. How to maintain page state in such a
scenario?

Any suggestions are welcome. Thanks in advance.

Jan 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: | last post by:
This is a very open ended question. I have an app with a page that uses link buttons to change the display. On the prior page you have a list of objects. You click one of those objects to see it's...
5
by: Dominic | last post by:
My question is about how to maintain view state in mobile ASP.NET across postback / request in a web farm environment. First of all, let's assume the web-farm does NOT use stick-session feature....
7
by: Tom wilson | last post by:
I have created a very simple example that doesn't work. Form1 contains a textbox and a button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
1
by: Tom wilson | last post by:
Yes, I'm sorry, it's me again. :) Yesterday I went through hell trying to figure out why my aspx pages wouldn't maintain state. I had a simple example I (we) eventually got to work. What...
1
by: Robert Burdick [eMVP] | last post by:
Hello All: I am writing an ASP.NET application that will take the user to PayPal to make some payments. Before going to PayPal, I collect relevant user information and store it in a session...
0
by: Edwin Knoppert | last post by:
I'm using a simple treeview for helpsystem. The treeview is on a masterpage, right beside it it has the container. The user uses the treeview to navigate to helppages using this masterpage. But on...
7
by: Andrew Robinson | last post by:
I have a treeview control that I use as a menu & navigation control within a master page. The nodes for this control are loaded from a database which contains the text and url of each like and the...
11
by: Joseph Geretz | last post by:
I've been looking at two approaches for the maintenance of Session state for a Web Service application. One approach uses the old familiar Session object which I've used in the past for Web...
2
by: Evan M. | last post by:
Hello there, I have an interesting problem to takle. I'm creating a website that's going to be run in a local Intranet. The site uses a MasterPage / content page scheme, with the Master page...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.