It’s important to be off to a good start when working on the web. Often, I get requests to moch-up a prototype web template that will be passed off to a developer to begin writing code. While I enjoy the challenge of coming up with a design from scratch, often times there is a request to have certain features and layout that are similar to a previous web application. Welcome to Visual Studio Templates.
FIrst things first, lets decide on a layout for our master page. (I choose #24)
http://blog.html.it/layoutgala/
View the source of your chosen layout and grab the <style> content and the <body> content and put it in their respective places.
Step 1
Place the content between <style> and put it in a separate .css file (optional but recommended)
<head runat="server">
<title>Template</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
Step 2
Copy the contents between <body> and don’t forget to include a <asp:ContentPlaceHolder>, I’ve edited some of the placeholder text here for readability purposes.
<body>
<form id="form1" runat="server">
<div id="container">
<div id="header"><h1>Header</h1></div>
<div id="wrapper">
<div id="content">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
<div id="navigation">
<p><strong>2) Navigation here.</strong> long long fill filler very fill column column silly filler</p>
</div>
<div id="extra">
<p><strong>3) More stuff here.</strong> very text make long column make filler fill make column column silly filler</p>
</div>
<div id="footer"><p>Footer.</p></div>
</div>
</form>
</body>
If you’ve been following along, you should have something similar to this.

Alright, now comes the cool part. If you’re happy with your template, you can now proceed to exporting your template by following these simple steps
- Go to: File -> Export Template
- Select Project Template
- Click Next
- You will now have the option to name the template as well as provide a description and icon to display in your New Project window.
- Click Finish
You should now see the web site in your “New Web Site” dialog box under the My Templates section. In case you were curious, what you really did was create a zip package containing the files of your solution and dropping it in the My Documents\Visual Studio 2008\My Exported Templates folder.

If you would like to learn more about the advanced topics of Visual Studio Templates, start by checking out the resources from MSDN.
http://msdn2.microsoft.com/en-us/library/6db0hwky.aspx