简体   繁体   English

找不到ASP.NET MVC资源控制器

[英]asp.net mvc resource cannot be found controller

i got stack on my project the problem is after adding new controller class and views for the actions unable to link the views with existing views * 我在我的项目上堆叠了问题,问题是在添加了新的控制器类和视图后,无法将视图与现有视图链接的操作*

The resource cannot be found 没有找到您要查的资源

.* i have home and account controller classes which work well and i add new controller class users and i have to action methods index and adduser both have view but anytime when i try to retrieve view from the new controller class it dosnt found the pages. 。*我有家庭和帐户控制器类,它们可以很好地工作,并且我添加了新的控制器类用户,并且我不得不操作方法index和adduser都具有视图,但是任何时候当我尝试从新的控制器类中检索视图时,它都找不到页面。 eg <%= Html.ActionLink("users", "Index", "users")%> please help !!! 例如<%= Html.ActionLink(“ users”,“ Index”,“ users”)%>请帮助!

have you created views? 您是否创建了视图?

Guideline: 指导方针:

  1. create controller controller_nameController 创建控制器controller_nameController
  2. create action public actionresult action_name(){return View();} 创建动作public actionresult action_name(){return View();}
  3. create views Hit ctrl+m, ctrl+v or right click on the action whose view you would like to create. 创建视图单击ctrl+m, ctrl+v或右键单击要创建其视图的操作。

在此处输入图片说明 4. check if you really have created a view named action_name in controller_name folder 4.检查您是否确实在controller_name folder创建了一个名为action_name的视图

在此处输入图片说明

Then you can create links: ("to display text", "action name", "controller name") 然后,您可以创建链接:( ("to display text", "action name", "controller name")

Hope this helps. 希望这可以帮助。

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

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