Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Help creating design-time properties

Reply
Thread Tools

Help creating design-time properties

 
 
C P
Guest
Posts: n/a
 
      04-11-2004
I've created 2 web controls MyControlParentClass, and MyControlChildClass
(both are direct WebControl descendents). MyControlParentClass has a
property of type MyControlChildClass. If I add a MyControlParentClass to a
web form, then add a few MyControlChildClass controls to the form as well, I
want to see a drop down list of the MyControlChildClass controls in the
property editor for my MyControlParentClass control. This part works fine,
but if I save my form then close and re-open it, the selected
MyControlChildClass has disappeared.

I've looked at all the examples I can find on MSDN and google (in particular
http://www.asp.net/Forums/ShowPost.a...&PostID=214342). But I
can't get this to work. At first I thought I'd need a TypeConverter
descendent to get the drop down list to even appear, but it seems to appear
without me doing anything with a TypeConverter. Maybe the TypeConverter is
what I need to implement to get the property to be persistent when I save my
web form?

I'm not trying to do anything fancy with the property. The
MyControlChildClass property of MyControlParentClass should simply show the
ID's of the available MyControlChildClass controls in the property editor at
design time. And of course setting the MyControlChildClass property at
runtime to the ID of a MyControlChildClass should set this property to an
instance of MyControlChildClass.

Thanks for any help,
Chris


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CompositeControls: ViewState properties w/ Mapped properties probl =?Utf-8?B?Q2hyaXN0b3BoZSBQZWlsbGV0?= ASP .Net 1 01-19-2006 09:19 AM
Making Custom Control Properties Visible in Visual Studio's Properties Palette Nathan Sokalski ASP .Net 0 10-17-2005 02:05 AM
Re: C++ properties Library Created (was Binding together Properties of Objects) Victor Porton C++ 1 08-29-2004 08:02 PM
Problems parsing when Properties.dtd.properties Kent Lichty Java 0 04-16-2004 03:08 PM
Help with creating a 2 dimensional array from one String in a properties file Daria Java 3 11-27-2003 12:12 AM



Advertisments