.net – 在控制器中创建子文件夹
发布时间:2020-05-23 08:39:31 所属栏目:asp.Net 来源:互联网
导读:我如何在ASP.NET MVC 1中执行子文件夹.例如,在控制器上采取以下文件夹结构: /Controller /Blog ViewsController.cs ArticlesController.cs /Customers SalesController.cs ProductsController.cs HomeController.cs 我
|
我如何在ASP.NET MVC 1中执行子文件夹.例如,在控制器上采取以下文件夹结构: /Controller
/Blog
ViewsController.cs
ArticlesController.cs
/Customers
SalesController.cs
ProductsController.cs
HomeController.cs
我想要看到以下文件夹结构,每个视图找到你的控制器: /Views
/Blog
/Views
Index.aspx
Admin.aspx
Show.aspx
/Articles
Show.aspx
Admin.aspx
/Customers
/Sales
Index.aspx
Totals.aspx
/Products
Index.aspx
Promotions.aspx
/Home
Index.aspx
解决方法你可以使用路线,即routes.MapAreaRoute("Blogs","Blog/Views/{controller}/{action}/{id}",new { controller = "Views",action = "Index",id = "" });
鉴于上述数据,这似乎可以满足您的需求. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 在ASP.NET MVC中使用控制器和用户控件设置活
- ASP.NET中操作SQL数据库(连接字符串的配置及获取)
- asp.net-mvc – ASP.NET MVC:除了IE之外,我如何向所有浏览
- ASP.NET 4的IIS和服务器操作系统要求
- 在Azure中为ASP.NET Core Web应用程序设置SQL连接字符串
- asp.net-mvc – MVC路由错误:约束条目’长度’
- 如何防止ASP.NET站点的图像热链接?
- 在ASP.NET动态数据中隐藏列
- wcf-data-services – 为什么我的oData响应没有导航属性
- ASP.Net 4中ClientIDMode的正确设置是什么,以获得ASP.Net 2
推荐文章
站长推荐
- asp.net-mvc – 会员提供商中的GetAllUsers在哪里
- asp.net – 干净的方式来防止输入按钮提交表单
- WPF 增加合计一栏
- asp.net – 在调用异步方法时不使用等待来防止死
- asp.net – 为什么当试图保存更改时,GridView行“
- asp.net-mvc-3 – 不能使用NuGet PagedList ASP.
- asp.net-mvc – Unity PerRequestLifetimeManage
- asp.net – 在MS Access 2003中INSERT到用户表中
- asp.net-mvc – MVC3 – 将字节数组发布到控制器
- asp.net-mvc-3 – MVC3重定向到ajax调用后的动作
热点阅读
