Apr 22, 2011 10:29 PM|jkirkerx|LINK
The 2 code examples show 2 different objects.
The first one is a class, that is incomplete and will never work. It's missing the parameters required to postback such as a handler. You can't just inherit something, until it is created. You have to create it first, then program it, and add it to a collection,
such as htmltextwriter.
The 2nd code example is just a dropdownlist from system.web.ui. But it's missing a event handler to tie the control to an event, and excute some code. Normally you just click on the control in design view, and the code behind page will add an event handler,
in which you type your code in.
There is plenty of sample code in this forum, that should give you insight to the basics of creating server or user controls. Take a look at some of them to gain insight into creating a successful control.