Hi Dave,
Here is my understanding inline:
1) When I click on a button, first it calls the server validation method,
then it calls the button click handler even though the validation method
returned false, then it calls the validation method a second time. So I
have
to validate in the button click handler too which makes no sense.
================================
As for Validation control, when we use server-side validation, the
Validation function of the validators are called after Page Load event, but
before processing postback events. Thus, we can use the Page.IsValid or
ValidatorControl's "IsValid" property determine whether the validation is
passed and our code logic in postback event should also change depend on
this detection.
2) I do not have to have an OnServerValidate for any of my other
CustomValidators - just for the one I have inside the Repeater control.
===============================
Which one(Row) is the one you want to make the validation control enable
validating? I think you can consider using the "ItemCreated" event of
Repeater control to customize certain control in the repeaterItem. Also,
you can consider using DataList control and put your particular validation
control only in the EditTemplate so that only the current Row being edited
will contains the validator control.
3) It has the validator in the html creates - it's just that it is marked
hidden.
=================================
I'm still not quite clear on this. Why would you configure the validator to
be invislbe?
Here are some msdn reference on using validation controls in ASP.NET 2.0:
#Learning More ¡ª Validation Controls
http://msdn2.microsoft.com/en-us/library/ms178317.aspx
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)