以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 关于Cookies的问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=147959) |
-- 作者:km007 -- 发布时间:2020/3/28 1:04:00 -- 关于Cookies的问题 Dim wb As New weui Dim e As RequestEventArgs Dim Names As String() = {"测试1","测试2","测试3","测试4","测试5"} For Each Name As String In Names Dim k As String = PY.GetPY(name, True, 3) wb.AppendCookie(k,Nothing) If e.Cookies.ContainsKey(k) MessageBox.Show(Name & ": Y") Else MessageBox.Show(Name & ": N") End If Next 为何全部都提示 “N” ?添加不了 Cookies
|
-- 作者:有点蓝 -- 发布时间:2020/3/28 8:41:00 -- AppendCookie后要返回前端,才能获取Cookies。如果是在本段代码中,AppendCookie后就可以认定是有了,没有必要判断 |