开发者

How do I create custom Controls for my VS2005 toolbox?

Ok, this question might more about design theory. I have successfully created controls that show up in my toolbox, so I'm pretty sure I have the process 开发者_开发知识库right. Also, my "AutoToolboxPopulate" is set to true, so things are showing up as I create them. My question is this: I'm sub-classing a native Control for specialized use. When I derive my class from an exposed concrete class, such as BulletedList, my custom Control appears in my Toolbox. However, when I drop it back to the parent, such as ListControl, my Control is not listed (actually it's grayed out when I "List All"). What am I missing?


I think the answer is that there must have been a problem with my code. I did eventually get these to show up, and it may have been an error somewhere.

However, here's an important tip: In order to get custom server controls to show up in your toolbox, you have to load your page into "design" mode. This will update the toolbox list. (apparently, it's necessary for the document outline, too)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜