How can i use the URL History of the IE from asp.net?

  • Thread starter Thread starter exshige
  • Start date Start date
E

exshige

Is there a way to say click a button on a page and have the page to load the
immediate previous visited page?

Thanks.
 
You can get the last page the user visited from a server
variable. I can't remember what it's called. Use this code
to loop through all the server variables...

Function GetSrvVariables() as String
Dim retString as String
Dim loop1, loop2 As Integer
Dim arr1(), arr2() As String
Dim coll As NameValueCollection

coll=Request.ServerVariables ' Load ServerVariable
collection into NameValueCollection object.
arr1 = coll.AllKeys ' Put names of all keys into a string
array.

For loop1 = 0 To UBound(arr1)
retString = retString & arr1(loop1)
arr2 = coll.GetValues(loop1) ' Get all values under this
key.
For loop2 = 0 To UBound(arr2)
retString = retString & ": " & arr2(loop2) & "<br>"
Next loop2
Next loop1

Return retString
end function
 
The Referrer is available in Request.UrlReferrer. Note that this is not
always supplied, so be sure to check it for Nothing before using it.
 
Hi,

I dont think that a roubd trip to the server required. use Javascript :

window.history.back();

Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
Back
Top