473,395 Members | 1,948 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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

Thanks.
Nov 17 '05 #1
3 1035
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
-----Original Message-----
Is there a way to say click a button on a page and have the page to load theimmediate previous visited page?

Thanks.
.

Nov 17 '05 #2
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.

--
John Saunders
Internet Engineer
jo***********@surfcontrol.com

"Lachlan James" <NO***********@NOsmsiSPAM.com.au> wrote in message
news:08****************************@phx.gbl...
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
-----Original Message-----
Is there a way to say click a button on a page and have

the page to load the
immediate previous visited page?

Thanks.
.

Nov 17 '05 #3
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
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Ashot | last post by:
This is sort of both Python and Vim related (which is why I've posted to both newsgroups). Python related: ---------------------- I have been frustrated for quite some time with a lack of a...
20
by: Dan | last post by:
Is there a way to obtain the last page visited? I don't want to go to that page, I just want to be able find out what page they came from, the url of that page. Is this possible?
10
Ajm113
by: Ajm113 | last post by:
Making a History Page for BIG Sites Intro: Ok, let's say after a while your website has grown massive. We're talking search engine, forum and video hosting -- you've got a LOT of content. And you...
0
by: lemnitzer | last post by:
Full Article: http://iamthewitness.com/FreedmanFactsAreFacts.html <-------- KEY DOCUMENT Steamy Excerpts: Will you be patient with me while I review here as briefly as I can the history of...
2
by: Max | last post by:
I recently moved to ASPnet Ext 3.5 What I can't get with Ajax and History browser managemet is this: User fills some fields (dropdown and textbox) on page 1 (all are in an update panel) User...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.