Web User Controls
Using the user controls may be one of the best moves you will make when developing an application in .NET. The user control will allow you to separate your reusable logic and keep it in one place. For many developers this is a great thing! Many of us have to re-create items over and over, after some time your code can look like crap and then you feel like crap because you have to deal with it.
Let’s say we have a site where I needed a “Quick Search” on every other page, but each page had a different look and feel or a different CSS document. All I would need to do is create a web user control “.ascx” file and lay down the basics of my quick search. Assign the div’s ID’s or classes, then include your control in each page that needs it. To style, just use your style sheet assigned to that page an add your styles.
Web controls make life a little easier when developing in .NET, so be sure to take advantage of this great tool and stop duplicating your work!


