Get referrer URL

H

Harley

I'm having problems getting the referrer URL in a VB.NET ASP.NET page.

A simple piece of code like this:

if not Request.URLReferrer is nothing then
_REFUrl = Request.URLReferrer.Host.ToString
end if

It is not working... Request.URLReferrer always returns nothing. The If...Then is to avoid a runtime error if you call the page directly, in that case there is no referrer and its ok for it to be blank....
but even when I link to the page from another page the referrer is blank.. it only gets a value when the page is posted back!

any idea? a bug? or what am I doing wrong?
 

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

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top