Evertjan. said:
I wouldn't say tricky:
add to your start.htm page:
<img src='/dummyjpg.asp' style='display:none;'>
and make a '/dummyjpg.asp' page containing only:
=============
<%
response.end
%>
You don't need to send a .jpg, etc here!
=============
The above will trigger the "Session_OnStart" event
However you don't need the "Session_OnStart" event,
as you can try this for '/dummyjpg.asp' page:
=============
<%
if session("isNewSession") = "" then
session("isNewSession") = "noMore"
session("theNewsetVariable") = "Blah"
end if
response.end
%>
You don't need to send a .jpg, etc here!
=============
Hi Evertjan, Thanks for this code.
I think I can do that in many ways, But still not able to get the best
solution yet for my requirement. Like:
1) I can do that If i set the asp.dll to invoke on htm request. So here the
session will start and my referral url will be set correctly. But it is
difficult to set the setting with ISP.
2) I can do as per you code here and can also do like:
Add a line of code in home page.htm
<script language="javascript" src="StartSession.asp"></Script>
in StartSession.asp I will not have only one line : <%@ Language=VBScript %>
so this will trigger the session_onstart. But if I try to get the referral
url in session_onstart then i will not get correct url. Because my asp file
was called by the home page so that will be my referral not the actual.
3) I can use Java Script on my Homepage like: document.referrer and I can
use the value in some asp file where I will set the referral url (Session
variable). But how do I pass that value to the asp page?
I think I am comming to the end but not with a best solution.
Thanks
Prabhat