Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

Validators

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Gleason jr Couturier - 29 May 2008 19:41 GMT
Is there a way to always show the validators?
I want to use validators and don't have to bother with field validation
(Page.IsValid)...

But there is an esthetic requirement : always show the little stars "*"
beside the required fields. (I'm using ErrorMessage="*"). The stars
disappear whenever the associated field is valid... I tried Visible="False"
on the validator and put a "*" myself beside each field but it disables
validation :(

Any ideas!?

Thanks!
George Ter-Saakov - 29 May 2008 19:52 GMT
Are you saying that if you set ErrorMessage = "" it disables validation?
Try to set  ErrorMessage = " " and then put those star yourself next to
required fields.

George.

> Is there a way to always show the validators?
> I want to use validators and don't have to bother with field validation
[quoted text clipped - 9 lines]
>
> Thanks!
Mike Gleason jr Couturier - 29 May 2008 20:03 GMT
> Are you saying that if you set ErrorMessage = "" it disables validation?
> Try to set  ErrorMessage = " " and then put those star yourself next
> to required fields.
>
> George.

No, in bad english, I tried to say : Visible="False" disabled client
validation! (I'm wondering why this property exists, since Enabled="False"
usually does this kind of thing!)

But your solution makes sense, I just don't know why I did not thought of it
:) Maybe too much concentration on my english :P

Thanks I'll give it a try!

Mike
Mark Rae [MVP] - 29 May 2008 20:09 GMT
> No, in bad english, I tried to say : Visible="False" disabled client
> validation!

When you set a webcontrol's Visible property to "false", the control will
not even be rendered to the client browser...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Mike Gleason jr Couturier - 29 May 2008 20:13 GMT
I just found out that there is another property besides "enabled" and
"visible"..

Display="none" did the trick...

Thanks

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.