LoginStatusControl in Master Page.

Posted by Community Admin on 04-Aug-2018 19:53

LoginStatusControl in Master Page.

All Replies

Posted by Community Admin on 08-Jul-2014 00:00

I have 2 master pages, one master page is used for main page or home page and the other secure master page is used after logging in. The Login Widget is used in main page master page and able to login and go to Secure pages. 

In my Secure Master page I have ,

<%@ Register Namespace="Telerik.Sitefinity.Web.UI.PublicControls" Assembly="Telerik.Sitefinity" TagPrefix="pc" %>

  <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />

 <pc:LoginStatusControl ID="LoginStatus1" runat="server" LoggedOutLayoutTemplatePath="~/SFRes/Telerik.Sitefinity.Resources.Templates.PublicControls.LoginStatus_LoggedOut.ascx" LogoutAction="Refresh"></pc:LoginStatusControl>
</form>

After I get to the secure pages I see the Logout button but when I click on it , there is no response, it does not do any postback. Added the properties LogoutAction="Redirect" LogoutUrl="/(path of the page" but still no luck.

Can you please help me redirect to the main page when Logout is clicked.

Thanks.

Posted by Community Admin on 11-Jul-2014 00:00

Hi Ravi,

Thank you for contacting us.

I am afraid this behavior is expected. You are not able to use the login status control in this manner as it will not connect to its codebehind and therefore no actions will raise when the button is clicked. What I can suggest is you use the out-of-the-box widget or create a custom one. You can find further information on the particular control in this forum thread. As you can see there, changing the template of this widget is not an option due to the output cache substitution we perform on it. 

Attached you can find a simple custom widget that performs the logic of the default login status control. Feel free to modify it as per your requirements.

I hope this helps. Let me know if there are further questions.

Regards,
Ivan D. Dimitrov
Telerik

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

This thread is closed