From the course: Visual Studio Developer Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Keyboard shortcuts for MVC views and controllers

Keyboard shortcuts for MVC views and controllers - Visual Studio Tutorial

From the course: Visual Studio Developer Tips

Keyboard shortcuts for MVC views and controllers

- [Instructor] ASP.net MVC developers spend a lot of time moving between their controllers and matching views. Here's a keyboard chart that that can help speed up that process. For this example, I'll open my home controller, and then I'll put my cursor in this action method call contact. Right-click and show you this context menu. Go to view, and it has this keyboard shortcuts Control M and Control G. So let's use it. Move down here, put my cursor back in that method, use the keystroke. Visual studio switches me over to the Contact.cshtml file. I make some edits, do whatever work I need to do here, spend half an hour working on the code. Now I'm ready to go back to the controller. I use the same keystrokes Control M Control G, and then I return back to the controller. I'll put my cursor in the about action method, use the keystroke to move the appropriate view. You know what, before I move back, I want to close the home controller so it's not open anymore. Then I'll do the keystroke…

Contents