Implementing a base page is pretty easy: all you need to do is add a class fi le to your App_Code
folder, add some code to it, and you’re done. What’s often a bit more diffi cult is to make sure each
page in your site inherits from this new base page instead of from the standard System.Web.UI
.Page class. Unfortunately, there is no way to configure the application to do this for you automatically
when using Code Behind, so you need to modify each page manually. Visual Studio makes it
a little easier for you by enabling you to export a page template that already contains this code. In
the next exercise you add a base page to the site and in a later exercise you see how to export a web
form to a template so you can add files that use the base page in no time.