Change Visual Studio source code behind stub code?

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

So the first thing I need to do is add some projects, etc. Is it necessary in any case to change this finished code to what I want, compared to what it puts by default?

Will the templates respond?

Tia Kevin

+3
source share
2 answers

Yes you are right. this is a template.

You can create project templates in the following directory

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

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

+5

, Templates - Visual Studio , .

Visual Studio :

  • Item Template
  • Project Template

Visual Studio : Templates in Visual Studio

+2

Source: https://habr.com/ru/post/1720999/


All Articles