简体   繁体   中英

Visual Studio 2012 - No Model Folder

I started a project in Visual Studio 2012. I selected the ASP.NET Web Forms Application but the folder structure does not contain a model folder. Is there a setting there needs to be changed for this to be created? However, creating a similar project in Visual Studio 2013 contains a model folder. Is there a difference because of the Visual Studio editions?

It is new in Visual Studio 2013. Previously, it was only MVC with a Models folder as it has Model-View-Controller architecture, an I think Microsoft found out it is a good idea to keep models in a Model folder even when it is Web Form. You can create it manually. Click on the project name on solution explorer, right click, on menu go to add-> New Folder and call it Models

在此处输入图片说明

ASP.NET web forms template does not include a Models folder, you're looking for ASP.NET MVC instead. 在此处输入图片说明

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