开发者

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")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜