T
tony collier
Hi
I have this declaration on most of my pages for the UrlReferrer.
String referrer=Request.UrlReferrer.ToString();
This works fine apart from when the user first visits the site on the home
page, which results in the following error
"Object reference not set to an instance of an object"
if i take the above line out , navigate to another page, put the line back
in to home page and navigate back to home page it works fine. So I am
guessing that at the start of the session UrlReferrer doesn't exist until
after the first page navigation. Any ideas how I can get round this?
tia.
I have this declaration on most of my pages for the UrlReferrer.
String referrer=Request.UrlReferrer.ToString();
This works fine apart from when the user first visits the site on the home
page, which results in the following error
"Object reference not set to an instance of an object"
if i take the above line out , navigate to another page, put the line back
in to home page and navigate back to home page it works fine. So I am
guessing that at the start of the session UrlReferrer doesn't exist until
after the first page navigation. Any ideas how I can get round this?
tia.