Hello,
I have a form that has custom validators set up for the required fields. I also have link buttons for triggering the Page's validate() method. I also turned off CausesValidation on all of the links, so that the Page.Validate() method would trigger programmatically. The link code for triggering the validation and the server validation looks like:
Code:
private sub lnkAdd_Click(sender as object, e as eventargs) handles lnkAdd.Click
Page.Validate()
if ( not Page.IsValid ) then
exit sub
end if
...
end sub
private sub cuvName_ServerValidate(sender as object, args as ServerValidateEventArgs) handles cuvName.ServerValidate
'Code to validate the name field
end sub
.. additional validators
I set up break points on all of the validators to debug, and the server validation events were never triggered when the page.validate() event fired. Anybody know why? I can get them to work in another web form similar to this manner.
Thanks,
Brian Mains