When you add a new page to your Web site, do you often find yourself cutting and pasting from
another page to get started? If you're spending more time importing controls and setting up content
regions for your master page than actually working on the new page, you might want to look into
creating an "Item template" in Visual Studio.
Visual Studio makes creating templates amazingly easy. Simply create a new file and
set it up exactly as you'd like it to appear when you create a new document from the template.
Once you've got the file just how you want it, choose "File -> Export Template..."
from Visual Studio's menu. In the dialog box that appears, select "Item template",
verify that the current project is selected, and choose the language category in which the template
should appear. The next screen is where you select the file you want to export as a template.
The third screen lets you select references. In most cases you can ignore these and
just click the "Next >" button. On the final screen you'll need to provide
a name for the template along with a short description. You'll also notice two checkboxes.
The first one tells Visual Studio to automatically import the new template and the second opens
a Windows Explorer window to the folder containing the new template.
Once you've completed the wizard, you can give the new template a test by using the
"File -> New File..." command. You should see your new tempate under
"My Templates" in the "Add New Item" dialog box.
If for any reason things don't work quite right, you can manage templates by adding or deleting
them from the location specified in Visual Studio's options screen
"Tools -> Options -> Projects and Solutions -> General".
It's usually something like
C:\Documents and Settings\User Name\My Documents\Visual Studio 2008\Templates\ItemTemplates.
Setting up a template for each of the document types you work with can be a great time saver.
Just make sure you give your templates good names and descriptions from the start, otherwise you
may find yourself wondering which one is which.