implement Ivalidator interface on an ASP.NET page.

M

Martin

Hi,

I wanted to preform my own custom validation for the entire page so i though
I would implemet the IValidator interface and do all of my validation in the
"Validate" method, and this works well with one small problem.

The "Page" class has a property called "IsValid" which is read-only.

IValidator implements a private variable called isvalid

AND

a property called "IsValid" -- however after implemeting this I can't set
the property "Isvalid" at all -- if i try I get a compile time error,
however I can directly set the variable "isvalid" and the property
"Page.IsValid" will accuratly reflect this.

I can't seem to over ride the property IsValid because this will break the
interface implementation.

so my question is how can I implement the IValidator interface on a page AND
set the IsValid property -- the interface requires the set accessor to be
there, but the page class has it as read only so it appears that i can't set
it.

any help or feedback is appreciated.

cheers

martin.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top