HttpCookie use in a code behind

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chris

    HttpCookie use in a code behind

    I'm struggling with using the HttpCookie object on a code behind. Used in the page works great
    I'm getting a: Type 'HttpCookie' is not define

    I've tried adding the namespace to the vb form but no luck

    Imports System.Data.Sql clien
    Imports System.Dat
    Imports Syste
    Imports System.Web.U
    Imports System.Web.UI.W ebControl
    Imports System.Web.UI.H tmlControl
    Imports System.Web.Http Cooki

    It's use

    'Now set cooki
    Dim objCookie As New HttpCookie("nas bawebsitenew"
    objCookie.Value s("userid") = memberdata3("US ER_EMAIL"
    objCookie.Value s("userpassword ") = memberdata3("US ER_PASSWORD"
    objCookie.Value s("datecreated" ) = Date.Now(
    objCookie.Expir es = DateTime.MaxVal u
    Response.Cookie s.Add(objCookie )
  • Cor Ligthert

    #2
    Re: HttpCookie use in a code behind

    Hi Chis,

    This is a normal question for the newsgroup

    microsoft.publi c.framework.asp net

    See the articles about cookies in that newsgroup


    I hope this helps?

    Cor


    Comment

    Working...