简体   繁体   中英

Remove default.aspx start up web form

How to remove this ? This always pop up as default everytime I create a new project on C# ASP.NET web form Application (default.aspx)

Try this -

(as in Visual studio 2015)

New Project >> Web >> Asp.Net Web Application >>

Now, select "Empty" template at the top & check "Web Form" box in the second block.

This would create

  1. A solution file (.sln): Required to group together all related files of the project
  2. References: It adds references to system/framework level dlls, by default. You can keep whichever required & delete the one which are not.
  3. App_Data: Empty folder.
  4. Models: Empty folder.
  5. Global.asax: Required file for a web forms project.
  6. packages.config & web.config: These are related to configuration files and are required.

The above set of files define an empty web form project.

You can add new files/folders to this project ie aspx or other types.
eg: name_of_your_choice.aspx - this creates an empty.aspx file with minimal required markup.

Why does visual studio adds those set of files in a new project?
These files are created as per the template selected in project creation wizard.

If you still find default files & folders with Empty option, you can create a blank solution file & create web project from scratch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM