Apr 22, 2012 12:36 AM|jkirkerx|LINK
You don't have the structure needed for your control to work in both design view and runtime.
Server Controls have a basic format to follow
Render, OnInit, OnLoad, and Properties
When you run the Server Control Wizard, it writes the basic format for you automatically, all you have to do is add a couple of more functions, and it will compile and work properly.
Render - renders your control for output to design view or run, you can fork inside the render function for output to either.
OnInit - You create your control in pure code, you can't create a string "<div></div>, but instead Dim panel_Div as Panel = new Panel
OnLoad - just like page.load, after you create your html object, you now program them with values
Properties - customize values for your control in design view, and they appear in both design view and runtime.
So go back and rewrite your control again from scratch, and do it the right way.