Hi
The ServerValidate event of CustomValidator has 2 parameters: source and args.
What each of them point out to? Any description of them please.
Thank you
Hi
The ServerValidate event of CustomValidator has 2 parameters: source and args.
What each of them point out to? Any description of them please.
Thank you
Argument source is reference of validator control and args represent event specific data.
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
{
if (args.Value != "OK")
{
args.IsValid = false;
}
}
Like all "EventHandler
"-style events, source
will refer to the object that raised the event (in this case the CustomValidator
instance) and args
will refer to event data associated to this specific event.
For ServerValidate
event, the args
parameter is of type ServerValidateEventArgs
. It has two important properties: