Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > retain page state

Thread Tools

retain page state

mark.csharp mark.csharp is offline
Junior Member
Join Date: May 2011
Posts: 1
I have a (c#) web app where I have a button, dropdown list and a textbox. I make a selection from the dropdown
and enter something in the textbox. I press the button and depending on the dropdown item selected and the text entered in the textbox, a csv displays in the browser. Note this is not a new browser window, I do not want a new browser window
I use
Response.AddHeader("Content-Disposition", "inline; filename=report.csv");
Response.ContentType = "application/octet-stream";

the csv appears. Now I want to be able to go back to the previous page and have the previous page state come back. how do I return to the previous state? I've read about viewstate, but i'm not sure how to use this, or even if this is the correct approach. can some give an example or point me in the right direction?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I retain data after the page has been reloaded? Flyguy ASP .Net 4 11-13-2008 06:12 AM
Retain treeview state during navigation Pål Andreassen ASP .Net 5 03-27-2008 10:52 PM
Can't retain state for Control inherted from ListBox Don ASP .Net Building Controls 1 04-26-2005 05:45 PM
server.transfer to reload PARENT page (contains frames) -- how to retain values? KathyB ASP .Net 3 07-01-2003 07:06 PM
Page Post Back -- how to retain selecteditem.value of TWO dropdowns??? KathyB ASP .Net 6 06-27-2003 03:33 PM