Howto inherit from an exisiting webcontrol in VS 2005
- From: Guillaume Hanique <development@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 06 Sep 2006 11:57:51 +0200
Hi,
I feel very stupid. I simply want to derive a control from system.web.ui.webcontrols.button and use that on my webform, but I just can't get it done. Can anyone tell me how to do that?
I can create my own usercontrol (Menu: Website > Add new item... > Web User Control). This creates an aspx and an aspx.vb file in the root folder, which inherits nicely from system.web.ui.usercontrol. But I want to inherit system.web.ui.webcontrols.button. I can't change anything in this aspx and aspx.vb file to make it inherit from the button and make it work.
The examples I found on the internet simply create a class and derive it from the webcontrol. But no one says if the save it in the root folder or in the App_Code folder. They use the <@ register tag to register it and they fill the assembly and namespace attributes. I tried a lot, but can't find anything I can put in the assembly and namespace attributes that makes it work.
What steps do I take in VS 2005 to add a control that is derived from system.web.ui.webcontrols.button to the solution and use it in my only webform Default.aspx?
Thanks so much!
Guillaume Hanique
.
- Follow-Ups:
- Re: Howto inherit from an exisiting webcontrol in VS 2005
- From: Van den Driessche Willy
- Re: Howto inherit from an exisiting webcontrol in VS 2005
- Prev by Date: Re: JavaScript or not JavaScript
- Next by Date: 'property cannot be set declaratively.'??
- Previous by thread: Using Server printers
- Next by thread: Re: Howto inherit from an exisiting webcontrol in VS 2005
- Index(es):