Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to redirect to default page on logout

Tags:

asp.net

i have a masterpage which contains loginstatus control

<asp:LoginStatus ID="LoginStatus1" runat="server" 
                     LogoutAction="Redirect" LogoutPageUrl="Default.aspx" />

now on logout click i want to redirect the page to default.aspx but it is not working

like image 831
Mishigen Avatar asked Dec 17 '25 23:12

Mishigen


1 Answers

I've been playing around with the login controls recently too and the only difference between what I have and yours is the "~/" in the logoutpageurl property. So try this;

<asp:LoginStatus ID="LoginStatus1" runat="server" 
     LogoutAction="Redirect"
     LogoutPageUrl="~/Default.aspx" />

Hope this helps.

like image 51
Cammy Avatar answered Dec 20 '25 15:12

Cammy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!