Back on Browser
Back on Browser
Back on Browser
Back on Browser
Back on Browser
Back on Browser Back on Browser Back on Browser Back on Browser Back on Browser Back on Browser Back on Browser Back on Browser
Back on Browser Back on Browser
Back on Browser
Go Back  Xtreme Visual Basic Talk > > > Back on Browser


Reply
 
Thread Tools Display Modes
  #1  
Old 06-22-2008, 09:31 AM
Jamesanthony's Avatar
Jamesanthony Jamesanthony is offline
Contributor
 
Join Date: May 2003
Location: Dublin
Posts: 502
Default Back on Browser


Hi all
Hope this is easy, have searched but found nothing
It may seem stupid to do as the browser already has a back button to return you to the screen but I want a button on my page to do the same. SO
How do I write code that acts as a BACK button on the browser
I am hoping something like Response.Redirect "Back" or something
Thanks in advance
Reply With Quote
  #2  
Old 06-24-2008, 04:46 AM
Jamesanthony's Avatar
Jamesanthony Jamesanthony is offline
Contributor
 
Join Date: May 2003
Location: Dublin
Posts: 502
Default

Maybe I phrased the question wrong.
I just want to go back to the page I was on and hold the same details
As in pressing BACK on Browser
Then my original page with original values is still active and I don't have to load the page and destroy the values
Is this harder than I am giving the Back button credit for ?
Was hoping for something like
Response.Redirect(Browser.back.button)
Oh Well
Reply With Quote
  #3  
Old 07-02-2008, 09:32 AM
mcdonnc2004's Avatar
mcdonnc2004 mcdonnc2004 is offline
Junior Contributor
 
Join Date: Dec 2003
Location: Liverpool, UK
Posts: 276
Default

The back function has to be done on the client side (Javascript), not the server side (ASP.NET).

You can make a standard button or web link and use the history.back(1) function to go back a page. You would typically use it like this:

Code:
<a href="javascript:history.back(1);">Back to previous page</a>
Of course, there is a way to send a person to the previous page using ASP.NET. The Request.UrlReferrer function will get the URL of the previous page, but this is not the same as sending them back a page. With this you are effectively sending a brand new HTTP request to that page so all parameters would be lost.

Note that the Javascript way of sending them back does not guarantee to keep the page values, but it does replicate the function of the back button.
Reply With Quote
  #4  
Old 07-06-2008, 09:17 AM
Jamesanthony's Avatar
Jamesanthony Jamesanthony is offline
Contributor
 
Join Date: May 2003
Location: Dublin
Posts: 502
Default

Thank you very much
That is really helpful
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Back on Browser
Back on Browser
Back on Browser Back on Browser
Back on Browser
Back on Browser
Back on Browser Back on Browser Back on Browser Back on Browser Back on Browser Back on Browser Back on Browser
Back on Browser
Back on Browser
 
Back on Browser
Back on Browser
 
-->