May 21, 2008 01:47 PM|jkirkerx|LINK
Delete the RenderContents(ByVal writer As HtmlTextWriter)
And use this statement. This is a vb example - it detects design view, and forks the controls load sequence
Protected Overrides Sub Render(ByVal writer
If Not Me.Context Is Nothing Then
You design your control in RenderDesignMode until you get the look and feel you want. Then copy the code to OnInit or CreateChild. Add Sub OnLoad for your control logic, to populate data.
In RenderDesignMode, you have to manually render the control using the top level parent object you made. I use panels as control containers, and place this at the bottom of my code. panelContainer is my top level object.
This forces the Rendering of the control.