Copied to clipboard

Flag this post as spam?

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


  • Dimitris Papadimitriou 14 posts 34 karma points
    Aug 03, 2011 @ 16:13
    Dimitris Papadimitriou
    0

    Cannot use LoginStatus control on a template

    Hi!

    I'm tried to add the following into a template:

    <asp:LoginName ID="LoginName1" runat="server" />
    

    Works fine. However it does not work fine when I add this:

    <asp:LoginStatus ID="LoginStatus1" runat="server" />
    

    I get this error:

    Control 'ContentPlaceHolderDefault_cp_top_LoginStatus1' of type 'LoginStatus' must be placed inside a form tag with runat=server.

    Ofcourse the control is already in a form, since I put it right after the first one that works.

    Any ideas?

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Aug 04, 2011 @ 08:35
    Richard Soeteman
    0

    Hi,

    The loginname control doesn't require a form runat=server tag, the loginstatus control does. So check, double/triple check that your control is rendered inside the form runat=server tag.

    Cheers,

    Richard

  • Dimitris Papadimitriou 14 posts 34 karma points
    Aug 05, 2011 @ 11:19
    Dimitris Papadimitriou
    0

    You are so right! I was mislead from the fact that LoginName was working!

Please Sign in or register to post replies

Write your reply to:

Draft