I'm new to MVC.
I am curious if there are any built-in shortcuts to navigate between model/view/controller.
Thanks
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.
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.
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.
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.
While inside a controller action:
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.
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