Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alter initial Visual Studio code behind stub code?

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

like image 341
klkitchens Avatar asked May 11 '26 23:05

klkitchens


1 Answers

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

like image 88
Mehdi Golchin Avatar answered May 13 '26 12:05

Mehdi Golchin