Dennis Bottjer | ASP.NET + SharePoint Architect, Trainer & Speaker

"An Ounce of Prevention is Worth a Pound of Cure" - Ben Franklin
posts - 168, comments - 59, trackbacks - 41

My Links

News

Add to Technorati Favorites The views expressed in this blog are mine and mine alone, not that of my employer, Microsoft, or anyone else’s. No warrantee is given for the quality of any material on this site.

Tag Cloud

Archives

Post Categories

Alternative User Control Definition

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.

Print | posted on Tuesday, October 11, 2005 12:42 AM | Filed Under [ ASP.NET ]

Comments have been closed on this topic.

Powered by: