Does anyone know what is causing the error below. The following scipt runs
in .asp but not .aspx??? Please help.
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: BC30081: 'If' must end with a matching 'End If'.
<%
'Set Session ID for each visitor to the site.
if Request.Cookies("SID") = "" then
if Session("SID") = "" then
Function CreateGUID()
Dim oTypeLib, sGUID
set oTypeLib = Server.CreateObject("Scriptlet.Typelib")
sGUID = oTypeLib.GUID
sGUID = LCase(sGUID)
sGUID = Mid(sGUID, 1, Len(sGUID) - 2)
Set oTypeLib = Nothing
CreateGUID = sGUID
End Function
Response.Cookies("SID")=CreateGUID
Response.Cookies("SID").Expires = Date + 365
Session("SID") = CreateGUID
end if
end if
if Request.Cookies("SID") <> "" then
if Session("SID") = "" then
Session("SID") = Request.Cookies("SID")
end if
end if
if Session("SID") <> "" then
if Request.Cookies("SID") = "" then
Response.Cookies("SID") = Session("SID")
Response.Cookies("SID").Expires = Date + 365
end if
end if
'Set Tracking Variables for each visitor to the site.
if LEN(session("id")) < 1 then
if LEN(Request.QueryString("id")) <> 0 then
if LEN(Request.Cookies("id")) < 1 then
Session("id") = Request.QueryString("id")
Response.Cookies("id")=Request.QueryString("id")
Response.Cookies("id").Expires = Date + 365
Session("keywords") = Request.QueryString("keywords")
Response.Cookies("keywords")=Request.QueryString(" keywords")
Response.Cookies("keywords").Expires = Date + 365
Session("campaignno") = Request.QueryString("campaignno")
Response.Cookies("campaignno")=Request.QueryString ("campaignno")
Response.Cookies("campaignno").Expires = Date + 365
Session("adgroup") = Request.QueryString("adgroup")
Response.Cookies("adgroup")=Request.QueryString("a dgroup")
Response.Cookies("adgroup").Expires = Date + 365
end if
end if
end if
if LEN(Request.Cookies("id")) <> 0 then
Session("id") = Request.Cookies("id")
Session("keywords") = Request.Cookies("keywords")
Session("campaignno") = Request.Cookies("campaignno")
Session("adgroup") = Request.Cookies("adgroup")
end if
'Set session Referring URL, IP, Broswer Type so that it can be captured with
order.
if LEN(Session("referer")) < 1 then
Session("referer") = Request.ServerVariables("HTTP_REFERER")
Session("scriptname") = Request.ServerVariables("SCRIPT_NAME")
Session("useragent") = Request.ServerVariables("HTTP_USER_AGENT")
Session("remotehost") = Request.ServerVariables("REMOTE_HOST")
end if
%>