I don't know if I am being daft but I can't find a way of finding all usages of a View (cshtml file) with VS and Resharper. The view could be full or partial. If someone could help me out this would be useful for a new project I am working on!
ASP.NET MVC views are stored in Views folder. Different action methods of a single controller class can render different views, so the Views folder contains a separate folder for each controller with the same name as controller, in order to accommodate multiple views.
ReSharper will jump to the declaration of the corresponding type, method, field, or local variable in the relevant source file. For library symbols, the corresponding entity will be displayed in Visual Studio's Object Browser or in the editor as metadata view or decompiled code, depending on ReSharper settings.
View is a User Interface which displays data and handles user interaction. Views folder contains separate folder for each controller. ASP.NET MVC supports Razor view engine in addition to traditional .aspx engine. Razor view files has .cshtml or .vbhtml extension.
The View method is the endpoint of a rather sophisticated pipeline that finds, at the other end, the selected ASP.NET MVC view engine. Whenever you invoke the method View, an instance of the ViewResult class is created and returned more or less as in the code below.
If you have ReSharper installed:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With