Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigate between Model/View/Controller keyboard shortcut?

I'm new to MVC.

I am curious if there are any built-in shortcuts to navigate between model/view/controller.

Thanks

like image 310
Shimmy Weitzhandler Avatar asked Nov 04 '12 01:11

Shimmy Weitzhandler


People also ask

What is the shortcut key for navigate?

The Tab key will navigate through the various fields. A Shift+Tab moves backwards in the navigation between those items. Once you have landed on an area within the dialogue box, you may need to use the up, down, left, or right arrows to make a more specific choice.

How do you go from view to controller?

ViewBag is a very well known way to pass the data from Controller to View & even View to View. ViewBag uses the dynamic feature that was added in C# 4.0. We can say ViewBag=ViewData + Dynamic wrapper around the ViewData dictionary. Let's see how it is used.

How do you navigate with keyboard codes?

To shift focus from the code window to the navigation bar, press the shortcut key combination Ctrl+F2. To shift focus from box to box on the navigation bar, press the Tab key. To select the navigation bar item that has focus and return to the code window, press the Enter key.

What is Ctrl KD in Visual Studio?

Ctrl + K + D (Entire document) Ctrl + K + F (Selection only) To find out which key bindings apply in YOUR copy of Visual Studio, look in the Edit > Advanced menu - the keys are displayed to the right of the menu items, so it's easy to discover what they are on your system.


1 Answers

While inside a controller action:

  • Ctrl+M, Ctrl + G => Go to view
  • Ctrl+M, Ctrl + V => Add view ...

The same actions are accessible in the context menu when you right click while inside a controller action.

The Model in ASP.NET MVC is quite an abstract notion and there's no keyboard shortcut allowing you to navigate to it as there's no clear definition of what this is. You could have a single controller action working with multiple Models or a single Model reused withing multiple controller actions, so it is not clear enough what do you mean by navigate to model.

like image 77
Darin Dimitrov Avatar answered Sep 22 '22 10:09

Darin Dimitrov