UserNameRequiredErrorMessage question

  • Thread starter Thread starter Stan SR
  • Start date Start date
S

Stan SR

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

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,
 
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
 
Back
Top