goodmorningsky Posted April 3, 2005 Posted April 3, 2005 I make Validator : System.Web.UI.WebControls.CustomValidator class. and defined ValidationType property which is type of ValidateType. I want to make the proerty is shown with Extended dropdown menu in properties window of Design mode. I did following but, it doesn't show. How can I do it? using System; using System.Web.UI; using System.ComponentModel; namespace TestControls { /// <summary> /// Summary description for Validator. /// </summary> [DefaultProperty("ValidationType")] public class Validator : System.Web.UI.WebControls.CustomValidator { public Validator() { } private ValidateType _validateType; [bindable(true), Browsable(true), Category("Appearance"), TypeConverter(typeof(ValidateType))] public ValidateType ValidationType { set { _validateType = value; switch(_validateType) { case ValidateType.Email: this.ClientValidationFunction="OnValidate_Email"; this.ErrorMessage = "Test Error"; break; } } } } } using System; namespace TestControls { public enum ValidateType { Email = 1, Phone = 2, } } Quote Sun Certified Web component Developer, Microsoft Certified Solution Developer .NET, Software Engineer
Moderators Robby Posted April 5, 2005 Moderators Posted April 5, 2005 You made our property writeOnly, place a "get" to allow "read" as well. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.