how do i redirect after logout in asp.net
I've placed login status control on a page, and placed under LogoutP开发者_Python百科ageUrl to Default.aspx.
However, after I logout it redirects me to
...default.aspx?ReturnUrl= some stuff
So, it does not redirect me directly to default.aspx. How do I force 'real' redirect ?
Thanks
EDIT:, solved: this in linkbutton:
Session.Abandon()
FormsAuthentication.SignOut()
Response.Redirect("~/Default.aspx")
Place linkbutton and this code onCLick()
Session.Abandon()
FormsAuthentication.SignOut()
Response.Redirect("~/Default.aspx")
精彩评论