468,511 Members | 1,700 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,511 developers. It's quick & easy.

How do I see Custom Contrrol properties in the designer?

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
1 1173
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.

Similar topics

9 posts views Thread by James Geurts | last post: by
reply views Thread by paul.phillips | last post: by
3 posts views Thread by Wade | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.