Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > UserNameRequiredErrorMessage question

Reply
Thread Tools

UserNameRequiredErrorMessage question

 
 
Stan SR
Guest
Posts: n/a
 
      08-09-2007
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

 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      08-09-2007
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" <(E-Mail Removed)> wrote in message
news:uM%(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Stan SR
Guest
Posts: n/a
 
      08-09-2007
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" <(E-Mail Removed)> wrote in message
> news:uM%(E-Mail Removed)...
>> 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

>
>


 
Reply With Quote
 
Teemu Keiski
Guest
Posts: n/a
 
      08-10-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:uM%(E-Mail Removed)...
>>> 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

>>
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments