Results 1 to 3 of 3

Thread: easy one

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Connecticut
    Posts
    98
    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?

  2. #2
    Member
    Join Date
    Oct 2000
    Location
    Earth
    Posts
    32
    Code:
    			
    HttpCookie ss = Request.Cookies["login"];
    if (ss != null) {
            ....
    }

    i dunno if that's what you want, but u can do something like that?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Connecticut
    Posts
    98
    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
  •  



Click Here to Expand Forum to Full Width