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
asp 里 request.Cookies("user_name")为"user11"; aspx 里 Request.Cookies["user_name"]为NILL; 同一个网站! 如何处理?
“未将对象引用设置到对象的实例”。
http://www.yesky.com/SoftChannel/72342380468043776/20030618/1708715.shtml
http://www.yesky.com/SoftChannel/72342380468043776/20030318/1657893.shtml
但问题还是存在。
我在同一个网站的ASP页里可以读到Request.Cookies("user_name");
APSX里为什么就读不到
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
aspx 里 Request.Cookies["user_name"]为NILL;
同一个网站!
如何处理?
user_name 下划线的问题,改为后username一切顺利。