如何在我的应用程序中的哪个位置找到控制器? [英] How do I find a controller is present in which location in my application?
本文介绍了如何在我的应用程序中的哪个位置找到控制器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是MVC的新手。
我有控制器和动作名称。现在我想调试并检查代码,但是有很多文件夹和控制器文件,而且我不知道控制器存在的位置和放大器的位置。不知道如何找到它。
有人可以帮忙。
我尝试了什么:
我尝试过并且能够使用下面的代码获取控制器和操作名称。现在我想知道控制器的位置意味着在哪个文件夹中。
I am new to MVC.
I have controller and action name. Now I want to debug and check the code but there are so many folders and controller files and I
don't know where is the controller present & don't know how to find it out.
Can someone please help.
What I have tried:
I tried and able to get controller and action name using below code. Now I want to know where the controller is present means in which folder.
RouteData routeData = RouteTable.Routes.GetRouteData(new HttpContextWrapper(HttpContext.Current));
var action = routeData.GetRequiredString("action");
推荐答案
Ctrl-F打开查找对话框,然后搜索公共类<在此处插入控制器名称的开始>在整个解决方案中。
Ctrl-F to open the "Find" dialog, then search for "public class <insert start of controller name here>" in the entire solution.
这篇关于如何在我的应用程序中的哪个位置找到控制器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文