Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Method of quickly changing between view and controller in visual studio - ASP.NET MVC

Tags:

Is there a way of quickly switching between controllers and views in Visual Studio when developing ASP.NET MVC applications?

I find that the solution explorer has quickly become very difficult to navigate through simply due to the quantity of files that is in there.

like image 556
Chris Nevill Avatar asked Aug 01 '13 09:08

Chris Nevill


People also ask

How do you navigate from one view to another in MVC?

In Mobile JS, you can transfer from one view to another view by using App. transferPage method. To achieve this, set the page url '/controllername/viewname' (here it's given as /Home/Ajax) as the second parameter of App.

Which component in ASP.NET MVC can be used to pass data between controller to view assume you have to pass current date and time?

To pass data from the controller to view, either ViewData or ViewBag can be used. To pass data from one controller to another controller, TempData can be used.


2 Answers

Answering my own question Yes there is. There appears to be a default shortcut key Ctrl-M then Ctrl-G.

This will automatically switch between the two. If you're on the controller/action it will switch to the view and vice versa.

like image 110
Chris Nevill Avatar answered Oct 24 '22 01:10

Chris Nevill


Right click on the action -> go to view

like image 29
Hamdi Baligh Avatar answered Oct 24 '22 00:10

Hamdi Baligh