[Mono-list] BaseCompareValidator

Gaurav Vaish gvaish@iitk.ac.in
Tue, 30 Oct 2001 01:53:06 +0530


Hello,
    For the field System.Web.UI.WebControls.BaseCompareValidator.Test, the
signature is:

public ValidationDataType Type {get; set;}

    while is throws an ArgumentException if the specified data is not of the
ValidationDataTypeValue. How do I check that? Should it be something like
    1. Make a local instance of ValidationDataType
    2. Get an enumerator / array of all the members using reflection
mechanism
    3. Compare the value with these
    4. If no match is found, throw the exception

    Quite cumbersome. Any shorter methods would be highly appreciated.


Cheers,
Gaurav Vaish
----------------------------