Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving viewstate of a page while redirecting to ....

Status
Not open for further replies.

arash2005

Programmer
Jun 27, 2005
3
IR
Hi everybody,
I have a problem in preserving the state of a page (ASP.NET)while redirecting to a second page and returning to the first page.Does anybody know what the best practice is?
Thanks in advance.
 
why do u have a page inbetween? in .NET the processing meant for a page must be done by the page itself. redirection must be done only when all the processess are done...

Known is handfull, Unknown is worldfull
 
well,suppose you need to go to a second page where you can add records to a table, or find a record(you haven't got the search facilities in the first page) and take it that that you have filled a part of page controls and then you find out that the value you are looking for is not present in the dropdownlist,,,so you are sent to another page so that you can add your favorite value to the table(and automatically the value will be added to the dropdownlist back in the first page).How would you implement it?
 
>>then you find out that the value you are looking for is not present in the dropdownlis

i would suggest a popup(a special icon by the dropdown list). if u really want to preserve the values then the only way would be using sessions (an ASPX file CANNOT submit to another aspx file).

Known is handfull, Unknown is worldfull
 
You may also be able to make use of Server.Transfer as this preserves form and querysting variables between pages.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top