|
In the previous chapter we looked at building websites, as opposed to single pages. We covered several important concepts about sharing and how this can make your life easier (you see, your Mom was right after all when she asked you to share your toys). Not only does sharing code make developing sites easier, but it also eases the burden if you have to change the site. None of us want to do more than is necessary, so doing it once is better than repeating it in several places.
A great feature of ASP.NET is that this technique can also be applied to parts of the interface, giving us the ability to not only avoid duplicating code, but also to bring consistency to our pages. In this chapter we're going to show you how:
To create reusable content, using user controls
That content can be easily used on multiple pages
To customize reusable content
To load content depending upon the user's choices
Although we're getting towards the end of the book, you can rest assured that user controls are just as easy as some of the topics we covered right at the beginning.
|