问题
I am working with Visual Studio 2015.
I created a new ASP.NET Web Application project. Then get a screen to Select a template. I selected Empty.
The Project named WebApplication1 is created. It has 2 files
packages.config
Web.config
But it does not have Default.aspx
. I remember older version of Visual Studio used to create Default.aspx
automatically. So how can I add it?
回答1:
Follow these simple steps:
- Right click your project
- Click on New
- Select Web Form
- Write Default.aspx as name
回答2:
An empty template now means that you want project with no server/client file. If you want to add a Default.aspx, that means that you would like to create a Webform project. You can just:
Right click on the WebApplication1 project -> click on Add -> New Item -> Then select Web Form (change the name from WebForm1.aspx to Default.aspx)
来源:https://stackoverflow.com/questions/34008880/how-to-add-a-default-default-aspx-to-a-asp-net-web-application-project