Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • raghavendran 30 posts 50 karma points
    Jul 29, 2010 @ 12:55
    raghavendran
    0

    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...

  • Sascha Wolter 615 posts 1101 karma points
    Jul 29, 2010 @ 13:27
    Sascha Wolter
    0

    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.

  • raghavendran 30 posts 50 karma points
    Jul 29, 2010 @ 14:05
    raghavendran
    0

    If i check on page load....im not able to get anything...homepage.aspx is telling page not found.. :(

Please Sign in or register to post replies

Write your reply to:

Draft