.ne tLogin控件第二次登录问题
第一次登录时跳转到了默认页面,点击一个页面例如 a.aspx,点击退出,退出是用的Login的LoginStatus控件;第二次登录时应该也是跳转到默认页面 可是它跳转的是 a.aspx页面
该如何解决呢?? --------------------编程问答-------------------- 在默认页面和跳转页面之间,你产什么衔接访问的?你的默认页是不是母版页?
参考:
protected override void OnInit(EventArgs e)
{
if (!HttpContextUtility.IsLogon())
{
FormsAuthentication.SignOut();
Response.Redirect("~/Login.aspx?ReturnURL="+HttpUtility.UrlEncode(Request.Url.PathAndQuery));
}
else
{
if (PageListCollectionWithAuthentication == null)
{
PageListCollectionWithAuthentication = PageSettingDataCollection.Select(t => { return this.ResolveUrl(t.URL); }).ToArray();
}
}
base.OnInit(e);
}
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetNoStore();
........
....
}
这是母版页的代码。 --------------------编程问答-------------------- HttpContextUtility、PageListCollectionWithAuthentication 这些东西是哪来的 --------------------编程问答-------------------- 默认页面是母版页 a.aspx页面也是母版页 它们共用的一个母版页
补充:.NET技术 , ASP.NET