vbNewbie vbNewbie - 27 days ago 6
ASP.NET (C#) Question

how do i redirect after logout in asp.net

I've placed login status control on a page, and placed under LogoutPageUrl 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")

Answer

Place linkbutton and this code onCLick()

Session.Abandon()
FormsAuthentication.SignOut()
Response.Redirect("~/Default.aspx")