如果一个人登录身份验证成功.
我给他写一个COOK.
HttpCookie MyCookie = new HttpCookie("userlogon");
MyCookie.Value = "username";
Response.Cookies.Add(MyCookie);
如果他关闭了浏览器.这个COOKIE就自动消失.
但是如果他点注销.我怎么终止这个COOKIE.
我不想用SESSION.由于SESSION和ASP不能共享数据.
谢谢大家.
注销按钮? is it a client side button or server button?
if it is a server button, use gshope(北京.Net) s method
if it is a client button, see the DeleteCookie method here:
<SCRIPT>
// Delete the cookie with the specified name.
function DelCookie(sName)
{
document.cookie = sName + "=" + escape(sValue) + "; expires=Fri, 31 Dec 1999 23:59:59 GMT;";
}
</SCRIPT>
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/properties/cookie.asp
Response.Cookies.Remove("youcookie");
快快给分啊