Cookie Issue - Postet den (1205 Views)
Advanced Member
Carefree
Innlegg: 4224
4224
Code:

strIMDBs="Display"
If Request("strIMDBs") > "" Then
strIMDBs=Trim(Request("strIMDBs"))
IMDBI=Application(strCookieURL & "IMDBI")
Response.Cookies(strUniqueID)("IMDBI") = strIMDBs
Response.Cookies(strUniqueID & "IMDBI").Expires = Date + 30
ElseIf Request.Cookies(strUniqueID)("IMDBI") > "" Then
strIMDBs=Request.Cookies(strUniqueID & "IMDBI")
End If

For whatever reason, it dies, but the same server writes cookies just fine on another page. Error captured this, it seems that it thinks the cookie is a header?
006~ASP 0156~Header Error~The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
   
 Sidestørrelse 
Postet den
Advanced Member
Carefree
Innlegg: 4224
4224
Solved it. I just moved the entire routine above everything else.
 
Du må legge inn en melding