Copied to clipboard

Flag this post as spam?

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


  • William Djingga 27 posts 53 karma points
    Jan 13, 2011 @ 03:31
    William Djingga
    1

    ASP.NET login control is not working if wrapped under umbraco macro

    Hi All,

    I have this weird problem using standard ASP login control. 

    Here is the snippet code of my master page and macro:

    Master pages : 

     

    <%Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" %>
     
    <asp:Content ContentPlaceHolderID="BoilerplateMainContentPlaceHolder" runat="server">
     
    <asp:login runat="server"></asp:login> <umbraco:Macro Alias="Login" runat="server"></umbraco:Macro> </asp:Content>

     

    Login Macro:

    <%Control Language="C#" AutoEventWireup="true" CodeBehind="Login.ascx.cs" Inherits="Mat.usercontrols.Login" %>
    <asp:login id="Login1" runat="server"></asp:login>

    For some reason if I log in using the standard asp.net login , it will log me in successfully but not with the login control wrapped under usercontrol macro.

    Has anyone ever had the same problem with the asp.net login control?

    Thanks

     

  • Yohan 9 posts 32 karma points
    Jan 13, 2011 @ 04:27
    Yohan
    1

    I'm using an ASP.Net Login control wrapped inside an Umbraco macro right now and it works.  Could you tell us more about this problem?  What are you seeing when you login?  Are you using the default MembershipProvider, or are you rolling your own?

  • William Djingga 27 posts 53 karma points
    Jan 13, 2011 @ 05:40
    William Djingga
    1

    Hi,

    It just simply return a validation error with the asterisk mark on next to the textboxes

    username : --------------------------   *

    password : ---------------------------   *

    Login

    I am using default umbraco membership provider and umbraco 4.5.2

    This issue puzzled me as I can't see any difference between the standard asp.net login and the one one wrapped inside macro 

  • Yohan 9 posts 32 karma points
    Jan 13, 2011 @ 17:02
    Yohan
    1

    Are there any validation error messages or is it just the asterisks?

  • Michael Latouche 504 posts 819 karma points MVP 3x c-trib
    Jan 13, 2011 @ 17:13
    Michael Latouche
    1

    Hi,

    If I see your code correctly, you are actually using two login controls one under the other? Can you maybe explain the reason why you would have this, is one not enough ;-)

    Apart from that, what I see is that one if the control has an ID, and the other not. Maybe it can have to do with the way the control validates (maybe the submit of the macro login control triggers a validation on the master page login control), have you tried to specify a validationgroup name on one of the login controls (I'm not 100% sure it can, but it should)?

    Cheers,

    Michael.

Please Sign in or register to post replies

Write your reply to:

Draft