urgent - custom validator - ServerValidate function - problem

B

bruce barker

there are 2 properties and 1 method required to be implemented by a server
validator

two props:

ErrorMessage
IsValid

1 method

Validate

the IsValid property you implement returns validation result.

-- bruce (sqlwork.com)
 
Z

z. f.

in my custom validator ServerValidate function i set
args.IsValid = False
but the page execution continues like the page is valid and the validation
summary doesn't show the error message .

how come?

and how should it work, if the args parameter is passed byval?
it won't go anywhere outside of the function scope isn't it?
is this a bug in vb.net because trying to set it to byref causes compilation
error,
or i'm missing here something?

please advise from your experience, i don't see how to solve this.
nothing special about the code, just setting the args.IsValid = False in the
ServerValidate function, in debug mode i see that the function is called,
what else to check?
i can't set the page.IsValid since it's read-only.


what i will point is that i'm overriding the validate method like that:

Public Overrides Sub Validate()
If bCheckSomethging Then
... update some fields.
End If

MyBase.Validate()
End Sub

but it always calls the validate method - is there a problem the way it's
written?



TIA, z.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top