i have a masterpage which contains loginstatus contr开发者_JAVA百科ol
<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
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.
Try placing this in your web.config file.
<location path="default.aspx">  
  <system.web>  
    <authorization>  
      <allow users="*"/>  
    </authorization>  
  </system.web>  
</location>
you can just use the logoutAction attribute and set it to redirectToLoginPage
<asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="RedirectToLoginPage" />
that's suppose that in your web.config you add :
<forms loginUrl="~/Login.aspx" defaultUrl="~/Default.aspx" />
the logout action will redirect you then to the loginUrl.
if you want to redirect to specific url you set logoutAction to redirect and you specify whatever url you want.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论