UserNameRequiredErrorMessage question

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
 
T

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

Stan SR

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

Teemu Keiski

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

How to login using PDO 3
Math python question 10
Sending data from web page to Raspberry Pi 0
Anaconda Alternative Question 1
Color for hover over 1
Contact form question 2
Uhhhhh, What can I do next? 6
Tasks 1

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top