01 October 2005

Creating a Server Control from a User Control

[Until I can figure out where I put Pat Hynd's email address, I'll use this post to remind me that I promised to send him this info I mentioned after his talk at Code Camp 4...]

I've only created a handful of server controls, but they've always come from user controls that I decided to “upgrade.“  I've got a couple more on the list now, and find it easier to start with the GUI layout features and then modify that code into a full blown control project.

“ASCX Control Parser” on Code Project has been a great help in this method.  It takes and ascx file and loops through the control collection and generates the vb code needed to create the control in a “UI-less” environment.  It's not perfect, but it usually does about 80% of the grunt work for me.  It's a big help for long or complex layouts.

Filed under:

Comments

No Comments

 

News

Hey, somebody remind me to put something good in this space. :)