Recently I spoke at the 2005 Tallahassee, FL Code Camp.  My presentation was an "Introduction to Custom Server Controls."  During the the presentation I described the technical differences between user controls (.ASCX) and Custom Controls.  Even with a clear matrix of the differences, the distinctions were a little blurry for an audience that has built a few user controls and no Custom Controls.  I left Code Camp feeling I had done a good job presenting but was unsettled over the lack of clarity just mentioned.  For future presentations on this topic I must resolve this confusion.

I believe the answers to my challenge came while listening to a recent episode of www.DotNetRocks.com.  The guest was Miguel A. Castro and the topic of discussion was Web Controls.  During the interview Miguel described User Controls (.ASCX) as “…include files on steroids.”  In our days of classic ASP development it was common practice, good practice, to isolate parts of the UI that could be re-used and build an include file or a library.  So Miguel’s definition is actually not a bad way to understand User Controls (.ASCX).  Miguel also mentioned that early in the development process of ASP.NET, User Controls were going to be called “Pagelets.”  He explains, they are “…web forms with out form tags.”

Finally, one other important difference is that Custom Controls integrate into the page lifecycle while user controls do not.