By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,156 Members | 1,026 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,156 IT Pros & Developers. It's quick & easy.

How do I see Custom Contrrol properties in the designer?

P: n/a
How do I get the public properties of my custom control to show in the
designer. The properties are all Strings but they do not show up in
the designer property window.

My custom control inherits from:
System.Web.UI.UserControl

I have the following property:
Public Property workUnitCode() As String
....
End Property

I've tried putting the Browsable(true) tag but it does not help.

The custom control is in the same project with my page and I jsut drop
it onto the page. If I instantiate the control in the code-behind I
can see the properties.

Do I have to build the control in a dll and and include a reference to
that dll to make it work?

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

I always inherit from System.Web.UI.Control, not UserControl.

For my properties I have this:

<Browsable(True), Category("Stuff"),> _
Public Property FirstName() As String

For the properties I create custom designers for I use this:

<Browsable(True), Category("OtherStuff"),_
Editor(GetType(MyEditor), GetType(UITypeEditor))> _
Public Property FirstName() As String

Also be sure to add this line at the top of your control class:

Imports System.ComponentModel

Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

<ch*********@hotmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
How do I get the public properties of my custom control to show in the
designer. The properties are all Strings but they do not show up in
the designer property window.

My custom control inherits from:
System.Web.UI.UserControl

I have the following property:
Public Property workUnitCode() As String
...
End Property

I've tried putting the Browsable(true) tag but it does not help.

The custom control is in the same project with my page and I jsut drop
it onto the page. If I instantiate the control in the code-behind I
can see the properties.

Do I have to build the control in a dll and and include a reference to
that dll to make it work?

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.