In order to add properties, you had to subclass from something. Typically a
CustomValidator isn't used to subclass; BaseValidator is. If you subclass
from BaseValidator, you can add Public properties that will automatically
appear in the Properties Editor UNLESS you explicitly add the
BrowsableAttrib ute(false) to each of these properties. I doubt you did that.
Visual Studio.net automatically does several things for you when you
subclass from ANY System.Web.UI.C ontrol class:
1. It adds the <@ Register > tag to the form when the control is dragged and
dropped from the toolbox
2. It adds a reference to the assembly into the Project
3. It provides some visual appearance (which you can enhance) in design
mode. BaseValidator will provide all the visual appearance you need for any
new validator.
4. Its properties editor shows every public property not already hidden by
that BrowseableAttri bute set to false.
I would recommend deleting the controls from the VS.NET toolbox. Restarting
VS.NET and adding them again. I would also recommend testing this process in
a new web application on a new form in case there is something incorrect
about your existing project.
You may want to post code that shows what you have subclassed from and the
property definitions.
--- Peter Blum
www.PeterBlum.com
Email:
PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx
"Vinod I" <Vi****@PMAM.co m> wrote in message
news:OR******** *****@TK2MSFTNG P11.phx.gbl...
Hi Team,
I made a custom validator control which is having 2 public properties.
But after making dll & adding that to the ToolBox, I could not able to find
these properties in Property Box.
Can any body explain me where am I wrong ? Also, if I want to make this
control as like other validator control, e.g. to skip the "Registerin g on
the Page", wat should I do ?
web site name which explains all these aspects really appreciated.
Thanks in advance
Cheeeeeeeeers !!!!!!!!!