implement Ivalidator interface on an ASP.NET page.

Discussion in 'ASP .Net' started by Martin, May 19, 2005.

  1. Martin

    Martin Guest

    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.
    Martin, May 19, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QS5KLiB2YW4gZGVyIEJ1cmc=?=

    Validationgroups and IValidator problem (ASP.NET 2.0)

    =?Utf-8?B?QS5KLiB2YW4gZGVyIEJ1cmc=?=, Dec 9, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,613
    =?Utf-8?B?QS5KLiB2YW4gZGVyIEJ1cmc=?=
    Dec 9, 2005
  2. brantman

    Ivalidator and Validation Groups

    brantman, Jul 31, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,115
    Teemu Keiski
    Aug 1, 2006
  3. Peter Morris [Air Software Ltd]

    IValidator - multiple error messages

    Peter Morris [Air Software Ltd], Dec 7, 2004, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    129
    Peter Morris [Air Software Ltd]
    Dec 8, 2004
  4. A.J. van der Burg

    Validation groups and IValidator problem (ASP.NET 2.0)

    A.J. van der Burg, Dec 9, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    174
    A.J. van der Burg
    Dec 9, 2005
  5. Craig

    ASP.Net 2.0 Validation Groups & IValidator Controls.

    Craig, Sep 25, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    421
    Carl Reid
    Nov 10, 2006
Loading...

Share This Page