views:

82

answers:

2

When I add a new form to an ASP.NET project (WebForms), and then "View Code" some basic stub code is added -- basic "using" statements, form_load event, etc.

So the first thing I have to do is add some project usings, etc. Is there anyway to alter this canned code to what I want, vs. what it puts up by default?

Would templates be the answer?

TIA Kevin

+5  A: 

Yes, you are right. that is a template.

You can file project templates in the following directory

%VisualStudioPath%\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Web\1033

And item templates

%VisualStudioPath%\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Web\1033

Mehdi Golchin
+2  A: 

I think Templates is Visual Studio would help you in your problem if I understood your problem correctly.

There are two different template types in Visual Studio :

  1. Item Template
  2. Project Template

You can find more information about Visual Studio Templates here : Templates in Visual Studio

Braveyard