About The Author
Michael Flynn is a Web Developer at Terralever, an interactive marketing agency based in Tempe, AZ. He specializes in web technologies that include C# .NET, SQL, XML, AJAX, jQuery, Flash, and also skills in Photoshop and Illustrator. He was been involved in web development since 1998, and earned a Bachelors and Masters degree in Computer Engineering and Computer Science from the Univerisity of Louisville and holds an MSCT certificate in Web Applications.
Calendar
<<  September 2010  >>
SMTWTFS
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

Export A Website Template In Visual Studio

As a web developer consistency and organization is a key factor in efficient, scalable and maintainable projects.  Visual Studio has a nice little feature called Export Template Wizard that will create templates which future projects can be based upon.  I use this tool to create website structures I use over and over, without searching and adding items at the start of the project or during the website development process.  Everything will be available to me in a consistent structure every project.

Create Website

Creating a reusable template first starts with creating a new website and adding the necessary elements that are used in every project.  I have a seperate folder where I keep this template for later user or adding or deleting items in the future and recreating the template.  This post is using Visual Studio 2008.  Some items used in this template are listed below:

  • robots.txt
  • sitemap.xml
  • web.config
  • web.sitemap
  • global.asax
  • masterpage.master
  • stylesheet.css
  • reset.css
  • forms.css
  • basepage.cs
  • utility.cs
  • cssfriendly.dll

I also included pre-existing folders

  • App_Browsers
  • App_Code
  • App_Data
  • App_Themes
    • Default
      • Images
  • Assets
  • Bin
  • Script

What you include depends on your preference.  If you have any suggestions please leave a comment.

 

Export Template

The next step is to export this template to a zip file for reuse in Visual Studio.   Navigate to 'File' > 'Export Template...'

If this is not available which most likely it isn't, right click at the top of Visual Studio near the menu or toolbars and you get a long list of toolbar selections. 

Select 'Customize...' at the very bottom.  The 'Customize' dialog will appear. 

You should be on the 'Command' tab. 

Select 'File' from the 'Categories' list box. 

Under the 'Commands' listbox select and drag 'Export Template...' to the 'File' menu and drop it anywhere. 

We now can export our website to a reusable template.


Export Template Wizard

A dialog window called 'Export Template Wizard'  will appear to 'Choose Template Type'

Make sure the 'Project template' radio button is selected. 

Next select from the 'From which project would you like to create a template?' dropdown select the template we are going to export from the solution. 

Last select the language you would like this template to be from the 'What language category should this template appear under in the New Project dialog box?' dropdown.

Click 'Next >'.

 Next we need to Select Template Options.

Options include choosing a Template icons, Template name, Template description, Automatically import the template into Visual Studio, and Display an explorer window on the output files folder.

Input your necessary options and click Finish.

Windows explorer will now open to the My Exported Templates folder in windows explorer, displaying a zip file that contains all the files of you website template. 


Import Website Template

After creating our website template we can now put it to use.  Create a new website in Visual Studio.   Look under the heading My Templates for the name of the template you created and click the OK button.  Our website templated is loaded with the structure we want and ready to use by your development team.

Conclusion

Looking at many websites with different stuctures can be very frusturating and at times can be time intensive especially on time sensitive projects.  Visual Studio offers a nice way to counter this by offering the ability to create your own templates without the need of searching for necessary files that are used in every project and remembering where they should go.

Download - Website Template.zip (129.88 kb)

Posted on 8/10/2008 3:18:00 PM by cblaze22

Permalink | Comments (17) | Post RSSRSS comment feed |

Categories: Visual Studio

Tags:

Currently rated 5.0 by 6 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Comments

August 13. 2008 22:02

SEO Diva

Wow Mike, what a fantastic first article! You put a lot of work into this and I'm really impressed. You rock!

SEO Diva us

June 25. 2009 10:49

future web themes

We think to the import web template that it has a nice layout,then thanks for sharing!

future web themes us

June 25. 2009 10:54

future web themes

The things that they could been through was the template that can fix in many web,Thanks for sharing.

future web themes us

August 26. 2009 08:59

sheela

A very good site about the website development with snap shot sample , good explanation.
Thanks a lot.
http://www.ibowsolutions.com/algeria

sheela gb

November 21. 2009 13:02

SEO Reseller

I recently got fascinated by Microformats. Not sure why but its a neat concept that is catching on as Microsoft and Google are taking notice. I recently wanted to create an easy way to render the most common Microformats, the hCard and hCalendar.

SEO Reseller us

December 18. 2009 03:52

future web themes

The things that they could been through was the template that can fix in many web,Thanks for sharing.

future web themes us

December 18. 2009 05:34

SEO UK

Glad to visit your blog. Thanks for great post that you share to us...

SEO UK us

December 20. 2009 05:24

bamboo flooring

Which software can I use to make Blogger templates?

bamboo flooring us

January 28. 2010 02:59

web designing india

knowledgeable tips for developing a website. Very nice info for developers.

web designing india in

March 9. 2010 20:44

pay day loans

In searching for sites related to web hosting and specifically comparison hosting linux plan web, your site came up.You are a very smart person! Big thanks for the useful info i found on My DotNet World - Export A Website Template In Visual Studio.

pay day loans

April 2. 2010 01:00

business continuity plan template

Really appreciate this post. It’s hard to sort the good from the bad sometimes, but I think you’ve nailed it!

http://www.expressbcp.com/

business continuity plan template gb

April 2. 2010 13:52

Alanya Emlak

I congratulate you for this blog.
I've really enjoyed.
I sincerely thank you again
<a href="http://www.7emlak.com">Alanya Real Estate</a>

Alanya Emlak tr

April 4. 2010 10:15

Search Engine Optimization Service

a fantastic first article! You put a lot of work into this and I'm really impressed. You rock!

Search Engine Optimization Service us

April 28. 2010 22:47

loans payday

Very useful article. Myself & my neighbor were preparing to do some research about that. We got a good book on that matter from our local library and most books were not as descriptive as your information. I am very glad to see such information which I was searching for a long time.

loans payday us

May 25. 2010 01:55

bangalore seo

How does a business collect from a customer that has filed bankruptcy?

bangalore seo us

May 25. 2010 04:05

credit card merchant services

You can get totally free business cards designs from this web. Ans also they are providing very good in credit card.

http://www.fdis-wolverine.com

credit card merchant services us

June 2. 2010 00:28

mbt shoes

Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

mbt shoes cn

Add A Comment




  Country flag