How to use Response.Redirct like a browser back button?

M

Michelle A.

What is the difference between the two?

I have a page "one" with a button using Response.Redirect("pagetwo.asxp") to
go to the next page.

On page two I have a button using Response.Redirect("pageone.aspx") to go
back to page one.

When I view page one, select some information, then go to page two, and then
select the back button (using the response.redirect) none of my selections
remain. If I just use the back button of the web browser everything works
fine.

Anything I am doing wrong?

Thanks.
 
K

Kevin Spencer

One caution about using JavaScript history, though: With ASP.Net it can have
unexpected results, as ASP.Net WebForms submit to themselves, and have
different ViewState data in them at different times.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
The more I learn, the less I know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top