简体   繁体   English

我们可以为mvc应用程序使用不同的文件夹结构吗?

[英]Can we have different folder structure for mvc application?

My project contains two different sections. 我的项目包含两个不同的部分。

  1. Quote and 引用和

  2. ProductSale 产品销售

I have created A folder called Areas in Web project and Created two subfolders Quote and ProductSale. 我在Web项目中创建了一个名为Areas的文件夹,并创建了两个子文件夹Quote和ProductSale。

Each subfolders has the Model, view and controller in it. 每个子文件夹中都有模型,视图和控制器。

When i tried to create the view, the TextboxFor<> option(intellisense) is not coming but Textbox option is showing in razor view. 当我尝试创建视图时,TextboxFor <>选项(intellisense)没有出现,但Textbox选项在剃刀视图中显示。

Do i need to include anything else or do we need to change some mapping/routing? 我是否需要添加其他内容,还是需要更改某些映射/路由?

Please help me with this issue? 请帮我解决这个问题?

Note: This is a asp.net mvc3 project 注意:这是一个asp.net mvc3项目

You need to copy the webPages section from the standard Views\\Web.config to your new Views folders. 您需要将webPages部分从标准Views\\Web.config复制到新的Views文件夹。
This section configures the WebPages framework to use MVC's view base type & helpers. 本节将WebPages框架配置为使用MVC的视图基础类型和帮助器。

In the future, you should use MVC's built-in Add Area menu item, which will do this for you. 将来,您应该使用MVC的内置“添加区域”菜单项,它将为您完成此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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