T
tshad
Why would HTTP_REFERER not be there in the Page_Load event?
I am using it to determine whether a page was called from a particular page.
I am doing:
sTest = Request.ServerVariables("HTTP_REFERER")
if (sTest = "") ORELSE (sTest.SubString(sTest.LastIndexOf("/")+1) <>
"job_posting_new2.aspx") then
newPosition = new Position
session.Remove("newPosition")
else
newPosition = session("newPosition")
end if
I was originally doing:
if (sTest.SubString(sTest.LastIndexOf("/")+1)
But if HTTP_REFERER wasn't there, I would get an error:
Object reference not set to an instance of an object.
Not sure why.
Thanks,
Tom
I am using it to determine whether a page was called from a particular page.
I am doing:
sTest = Request.ServerVariables("HTTP_REFERER")
if (sTest = "") ORELSE (sTest.SubString(sTest.LastIndexOf("/")+1) <>
"job_posting_new2.aspx") then
newPosition = new Position
session.Remove("newPosition")
else
newPosition = session("newPosition")
end if
I was originally doing:
if (sTest.SubString(sTest.LastIndexOf("/")+1)
But if HTTP_REFERER wasn't there, I would get an error:
Object reference not set to an instance of an object.
Not sure why.
Thanks,
Tom