Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Clientside Validation in UserControls

Reply
Thread Tools

Clientside Validation in UserControls

 
 
MattC
Guest
Posts: n/a
 
      07-22-2005
I have a user control that contains several requiredFieldValidators. The
page the control sits in has other RequiredFieldValidators. On submitting
the form all the validators on the page fire and correctly validate. The
validators in the control seem to validate but do not return true/IsValid as
so my form is not submitted.

I would like to do this ClientSide, the only resolution I can find is to
perform the validation for the usercontrol Server Side, but this has
implications with the a password textbox which will (rightly) not retain
viewstate over a postback. Is there something that I need to set in my user
control to allow clientside validation?

TIA

MattC


 
Reply With Quote
 
 
 
 
Peter Blum
Guest
Posts: n/a
 
      07-22-2005
It sounds like you have two groups of controls that have separate submit
buttons which should fire their own validators. ASP.NET 1.x doesn't handle
this case without using server side validation. ASP.NET 2.0 introduces
Validation Groups, which lets you assign a group name to the submit control
and the validators it fires. My Professional Validation And More
(http://www.peterblum.com/vam/home.aspx), which works with ASP.NET 1.x, also
includes Validation Groups in its 25 validators.

These are the solutions if you trying to keep client-side validation active.

--- Peter Blum
www.PeterBlum.com
Email:
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"MattC" <> wrote in message
news:...
>I have a user control that contains several requiredFieldValidators. The
> page the control sits in has other RequiredFieldValidators. On submitting
> the form all the validators on the page fire and correctly validate. The
> validators in the control seem to validate but do not return true/IsValid
> as
> so my form is not submitted.
>
> I would like to do this ClientSide, the only resolution I can find is to
> perform the validation for the usercontrol Server Side, but this has
> implications with the a password textbox which will (rightly) not retain
> viewstate over a postback. Is there something that I need to set in my
> user
> control to allow clientside validation?
>
> TIA
>
> MattC
>
>



 
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
ClientSide Validation (solution to bypass "Refresh" in JavaScript) IkBenHet ASP .Net 1 08-10-2005 04:22 PM
Clientside validation for DataGrid's text boxes Kris ASP .Net 1 06-30-2005 04:39 PM
Clientside Validation and Page.IsValid Paul ASP .Net 1 05-25-2005 03:14 PM
Clientside validation not working. Dennis Calla ASP .Net 1 01-13-2005 05:05 PM
Clientside validation not working Eddie Dodd ASP .Net 4 05-27-2004 07:31 AM



Advertisments