473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Accepty Properties in Property Box for Custom Validator Control

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 "Registering on
the Page", wat should I do ?

web site name which explains all these aspects really appreciated.

Thanks in advance

Cheeeeeeeeers !!!!!!!!!
Nov 18 '05 #1
1 1439
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
BrowsableAttribute(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.Control 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 BrowseableAttribute 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****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Vinod I" <Vi****@PMAM.com> wrote in message
news:OR*************@TK2MSFTNGP11.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 "Registering on
the Page", wat should I do ?

web site name which explains all these aspects really appreciated.

Thanks in advance

Cheeeeeeeeers !!!!!!!!!

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve Amey | last post by:
Hi all I am creating a basic control to perform some tasks, and I want to declare some events to be raised so they can be handled from the form that the control is on. I can create my own Event...
1
by: Vinod I | last post by:
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. ...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
0
by: Brian Young | last post by:
Hi all. I'm using the Property Grid control in a control to manage a windows service we have developed here. The windows service runs a set of other jobs that need to be managed. The control...
4
by: TS | last post by:
I am creating a User control and i create some dynamic controls in the init handler. one of the controls is a custom validator which i assign a serverValidate event handler. I usally always do my...
4
by: Rick | last post by:
Hello, I built a composite web control that has a textbox and a date control. added my custom control on a webform where there are other standard controls. Each control on the form has a...
5
by: TS | last post by:
I have a custom textbox that i need to access a label's text property. the label and textbox are 2 separate controls that will be on my page. Inside my custom control i want to have access to this...
2
by: R.A.F. | last post by:
Hi, I have a custom control in which i have a collection property named "Columns". this collection property add/remove column objects. in my Column class i have a property named Alignment...
6
by: shapper | last post by:
Hello, I am working in a class library with various custom controls. In which cases should a control inherit Control, WebControl and CompositeControl classes? And when should a custom...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.