LoginStatusControl in Master Page.
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.
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