UserNameRequiredErrorMessage question

Discussion in 'ASP .Net' started by Stan SR, Aug 9, 2007.

  1. Stan SR

    Stan SR Guest

    Hi,

    I use the login control and I set different messages for the
    UserNameRequiredErrorMessage and PasswordRequiredErrorMessage but I still
    have an * when the fields are empty.
    Any idea to fix that ?
    Regards,

    Stan
    Stan SR, Aug 9, 2007
    #1
    1. Advertising

  2. Stan SR

    Teemu Keiski Guest

    Hi,
    from docs:

    The UserNameRequiredErrorMessage property contains the error message
    displayed in a ValidationSummary control on the login page.

    The UserNameRequiredErrorMessage property value is displayed only when both
    the following conditions are true:

    a.. A ValidationSummary control is present on the page.

    b.. The User name text box is left blank by the user.


    --
    Teemu Keiski
    AspInsider, ASP.NET MVP
    http://blogs.aspadvice.com/joteke
    http://teemukeiski.net


    "Stan SR" <> wrote in message
    news:uM%...
    > Hi,
    >
    > I use the login control and I set different messages for the
    > UserNameRequiredErrorMessage and PasswordRequiredErrorMessage but I still
    > have an * when the fields are empty.
    > Any idea to fix that ?
    > Regards,
    >
    > Stan
    Teemu Keiski, Aug 9, 2007
    #2
    1. Advertising

  3. Stan SR

    Stan SR Guest

    Teemu,

    I 've placed an ValidationSummary like the docs says, but still have an
    asterisk.

    Here's the code

    <asp:Login id="Login1" runat="server"
    UserNameRequiredErrorMessage="<-- User name is required"
    PasswordRequiredErrorMessage="<-- Password is required"
    />
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" />

    Stan




    "Teemu Keiski" > Hi,
    > from docs:
    >
    > The UserNameRequiredErrorMessage property contains the error message
    > displayed in a ValidationSummary control on the login page.
    >
    > The UserNameRequiredErrorMessage property value is displayed only when
    > both the following conditions are true:
    >
    > a.. A ValidationSummary control is present on the page.
    >
    > b.. The User name text box is left blank by the user.
    >
    >
    > --
    > Teemu Keiski
    > AspInsider, ASP.NET MVP
    > http://blogs.aspadvice.com/joteke
    > http://teemukeiski.net
    >
    >
    > "Stan SR" <> wrote in message
    > news:uM%...
    >> Hi,
    >>
    >> I use the login control and I set different messages for the
    >> UserNameRequiredErrorMessage and PasswordRequiredErrorMessage but I still
    >> have an * when the fields are empty.
    >> Any idea to fix that ?
    >> Regards,
    >>
    >> Stan

    >
    >
    Stan SR, Aug 9, 2007
    #3
  4. Stan SR

    Teemu Keiski Guest

    Exactly. It said that it shows the message only in the ValidationSummary.

    "The UserNameRequiredErrorMessage property contains the error message
    displayed in a ValidationSummary control on the login page."

    If you want to show it differently, you need to customize the Login control
    by providing your own LayOutTemplate


    --
    Teemu Keiski
    AspInsider, ASP.NET MVP
    http://blogs.aspadvice.com/joteke
    http://teemukeiski.net

    "Stan SR" <> wrote in message
    news:...
    > Teemu,
    >
    > I 've placed an ValidationSummary like the docs says, but still have an
    > asterisk.
    >
    > Here's the code
    >
    > <asp:Login id="Login1" runat="server"
    > UserNameRequiredErrorMessage="<-- User name is required"
    > PasswordRequiredErrorMessage="<-- Password is required"
    > />
    > <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
    >
    > Stan
    >
    >
    >
    >
    > "Teemu Keiski" > Hi,
    >> from docs:
    >>
    >> The UserNameRequiredErrorMessage property contains the error message
    >> displayed in a ValidationSummary control on the login page.
    >>
    >> The UserNameRequiredErrorMessage property value is displayed only when
    >> both the following conditions are true:
    >>
    >> a.. A ValidationSummary control is present on the page.
    >>
    >> b.. The User name text box is left blank by the user.
    >>
    >>
    >> --
    >> Teemu Keiski
    >> AspInsider, ASP.NET MVP
    >> http://blogs.aspadvice.com/joteke
    >> http://teemukeiski.net
    >>
    >>
    >> "Stan SR" <> wrote in message
    >> news:uM%...
    >>> Hi,
    >>>
    >>> I use the login control and I set different messages for the
    >>> UserNameRequiredErrorMessage and PasswordRequiredErrorMessage but I
    >>> still have an * when the fields are empty.
    >>> Any idea to fix that ?
    >>> Regards,
    >>>
    >>> Stan

    >>
    >>

    >
    Teemu Keiski, Aug 10, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sean
    Replies:
    1
    Views:
    579
    Cowboy \(Gregory A. Beamer\)
    Oct 20, 2003
  2. =?Utf-8?B?UnlhbiBTbWl0aA==?=

    Quick Question - Newby Question

    =?Utf-8?B?UnlhbiBTbWl0aA==?=, Feb 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    640
    Iain Norman
    Feb 16, 2005
  3. =?Utf-8?B?YW5kcmV3MDA3?=

    question row filter (more of sql query question)

    =?Utf-8?B?YW5kcmV3MDA3?=, Oct 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    933
    Scott Allen
    Oct 6, 2005
  4. Philip Meyer
    Replies:
    0
    Views:
    407
    Philip Meyer
    Nov 30, 2003
  5. Bit Byte
    Replies:
    1
    Views:
    824
    Teemu Keiski
    Jan 28, 2007
Loading...

Share This Page