Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
i have a login page and a home page...using role based protection i have made the login page protect the home page...but once i login i get the login page content inside
<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %><asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server"> <form runat="server"><asp:LoginView Id="Login" runat="server"><AnonymousTemplate> <asp:Login ID="Login1" runat="server"></asp:Login></AnonymousTemplate></asp:LoginView><LoggedInTemplate> <p> Welcome <asp:LoginName ID="Loginname1" runat="server"/> </p> <asp:LoginStatus ID="LoginStatus1" runat="server"/></LoggedInTemplate></form></asp:Content>
This is the login page template....May i know y??? i want to get the home page but the link is homepage.aspx and shows loginpage content...
Hm, maybe there is an error logging the person in, to what have you set the error page when setting the role-based protection on the homepage?
Maybe try checking in the code-behind file on Page_Load if the user has been authenticated:
protected void Page_Load(object sender, EventArgs e){
if (HttpContext.Current.User.Identity.IsAuthenticated) {
//set some label here
}
Sorry, is the only thing I can think of at the moment, don't see anything faulty with the code you have provided.
If i check on page load....im not able to get anything...homepage.aspx is telling page not found.. :(
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Redirecting to a different page
i have a login page and a home page...using role based protection i have made the login page protect the home page...but once i login i get the login page content inside
<%@ Master Language="C#" MasterPageFile="/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<form runat="server">
<asp:LoginView Id="Login" runat="server">
<AnonymousTemplate>
<asp:Login ID="Login1" runat="server"></asp:Login></AnonymousTemplate>
</asp:LoginView>
<LoggedInTemplate>
<p> Welcome <asp:LoginName ID="Loginname1" runat="server"/> </p>
<asp:LoginStatus ID="LoginStatus1" runat="server"/>
</LoggedInTemplate>
</form>
</asp:Content>
This is the login page template....May i know y??? i want to get the home page but the link is homepage.aspx and shows loginpage content...
Hm, maybe there is an error logging the person in, to what have you set the error page when setting the role-based protection on the homepage?
Maybe try checking in the code-behind file on Page_Load if the user has been authenticated:
Sorry, is the only thing I can think of at the moment, don't see anything faulty with the code you have provided.
If i check on page load....im not able to get anything...homepage.aspx is telling page not found.. :(
is working on a reply...