Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Form Validation

Reply
Thread Tools

Form Validation

 
 
TCORDON
Guest
Posts: n/a
 
      10-23-2005
Is there a way to make the form validation highlight the fields where the
errors occur? (change the backcolor of the textboxes)?

And second, perform validation without postback and run some Javascript?

TIA


 
Reply With Quote
 
 
 
 
S.M. Altaf [MVP]
Guest
Posts: n/a
 
      10-23-2005
Hi,

Use a custom validator control. You can write your own routine in javascript for validation and in the process, highlight the fields that you want highlighted.

Keep in mind though, that if you're going to be highlighting server side controls, you'll need their ClientIds, and that you can get from server side code. So, you'll need to write your custom javascript in the server side and plugging in the clientid values as you generate it.

HTH,
Altaf [MVP]




--------------------------------------------------------------------------------
All that glitters has a high refractive index.
www.mendhak.com
"TCORDON" <(E-Mail Removed)> wrote in message news:%23whyRv%(E-Mail Removed)...
Is there a way to make the form validation highlight the fields where the
errors occur? (change the backcolor of the textboxes)?

And second, perform validation without postback and run some Javascript?

TIA


 
Reply With Quote
 
 
 
 
Peter Blum
Guest
Posts: n/a
 
      10-24-2005
Instead of rewriting every validator with a custom validator, consider an
alternative. I wrote a replacement to the ASP.NET validators called
Professional Validation And More (http://www.peterblum.com/vam/home.aspx).
You can set the style sheet of fields that have errors. You can have it set
focus to the fields with the errors. There are several other techniques to
attract the user's attention on its 25 validation controls. My validators
provide client-side validation on many more browsers than the ASP.NET
Validators in ASP.NET 1.x.

--- Peter Blum
www.PeterBlum.com
Email: http://www.velocityreviews.com/forums/(E-Mail Removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"TCORDON" <(E-Mail Removed)> wrote in message
news:%23whyRv%(E-Mail Removed)...
> Is there a way to make the form validation highlight the fields where the
> errors occur? (change the backcolor of the textboxes)?
>
> And second, perform validation without postback and run some Javascript?
>
> TIA
>
>



 
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
A form validation library with javascript validation Grigory Temchenko Python 0 12-28-2008 08:38 PM
string validation/ form validation OriginalBrownster Python 1 08-21-2006 01:50 AM
Struts validation for combine form fields validation Sumith Mathur Java 0 09-23-2004 06:26 PM
Form Validation Problem...Persisiting form fields on validation failure. bnp Javascript 4 05-12-2004 12:16 PM
Web form validation vs object validation Colin Basterfield ASP .Net 1 11-29-2003 12:10 AM



Advertisments