try:
HttpContext.Current.Request.Cookies["user_name"].Value;

解决方案 »

  1.   

    还是提示HttpContext.Current.Request.Cookies["user_name"].Value;
    “未将对象引用设置到对象的实例”。
      

  2.   

    http://www.aspcool.com/lanmu/dot.asp?ID=1066&bbsuser=aspnethttp://www.yesky.com/SoftChannel/72342380468043776/20030618/1708662.shtml
    http://www.yesky.com/SoftChannel/72342380468043776/20030618/1708715.shtml
      

  3.   

    asp.net和asp?
    http://www.yesky.com/SoftChannel/72342380468043776/20030318/1657893.shtml
      

  4.   

    谢谢net_lover(孟子E章)介绍这些知识。
    但问题还是存在。
    我在同一个网站的ASP页里可以读到Request.Cookies("user_name");
    APSX里为什么就读不到
      

  5.   

    Dim Cookie As HttpCookie = Request.Cookies("PhenixBBX")
                If Cookie Is Nothing Then
                    Cookie = New HttpCookie("PhenixBBX")
                    Cookie("IP") = "127.0.0.1"       'QBB Version
                    Cookie("master") = "phenixbbx"         'UserID
                    Cookie("key") = "0x0550"                'UserPassword
                    Cookie.Expires = DateTime.Now.AddDays(1)
                    Response.Cookies.Add(Cookie)
                Else
                    'Other Process
                End If
      

  6.   

    asp  里 request.Cookies("user_name")为"user11";
    aspx 里 Request.Cookies["user_name"]为NILL;
    同一个网站!
    如何处理?
      

  7.   

    HttpCookie cookie=Request.Cookies["user_name"];username=cookie.Value.ToString();不行吗?奇怪?
      

  8.   

    问题已经发现。
    user_name 下划线的问题,改为后username一切顺利。