|
-
Apr 18th, 2001, 07:30 AM
#1
Thread Starter
Lively Member
This should be an easy one for someone, but it has me confused.
In INLINE script, how do I check if the user has a cookie on his machine?
If I use:
Code:
<%
If Request.Cookies("MyCookie") = "" then
...................
End if
%>
I get the follwong error:
"System.NullReferenceException. Attempted to reference a null object reference" when there is no cookie.
How do I check for a cookie in .NET?
-
Apr 18th, 2001, 10:38 AM
#2
Member
Code:
HttpCookie ss = Request.Cookies["login"];
if (ss != null) {
....
}
i dunno if that's what you want, but u can do something like that?
-
Apr 18th, 2001, 01:10 PM
#3
Thread Starter
Lively Member
Is that C#? I was looking for VB as thats what I mostly know. Whats the VB version?
Thanks!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|