在框架页点击注销的问题
我是用javascript里写window.open( "login.aspx ",_top)来打开login页面,从而退出框架页。用linkbutton(就是注销按钮)的Attribution.add方法注册javascript方法,可是我转到login页面同时我想清空登陆用户的id也就是Session[ "user "]的信息,怎么弄啊
------解决方案--------------------Session[ "user "] = null;
------解决方案--------------------Session.Clear(); 就OK了
------解决方案--------------------if(HttpContext.Current.Request.Cookies[ "UserId "]!=null)
{
HttpCookie cookie= Request.Cookies[ "UserId "];
cookie.Expires=DateTime.Today.AddDays(-1);
HttpContext.Current.Response.Cookies.Add(cookie);
}
Response.Write( " <script> parent.window.location.href= 'default.aspx ' </script> ");