1.1 KiB
1.1 KiB
title | author | description | ms.author | manager | ms.date | ms.topic | ms.technology | ms.prod | uid |
---|---|---|---|---|---|---|---|---|---|
Adding a controller | rick-anderson | How to add a controller to a simple ASP.NET Core MVC app | riande | wpickett | 02/28/2017 | get-started-article | aspnet | asp.net-core | tutorials/first-mvc-app/adding-controller |
Adding a controller to a ASP.NET Core MVC app with Visual Studio
[!INCLUDEadding-controller1]
- In Solution Explorer, right-click Controllers > Add > New Item
- Select MVC Controller Class
- In the Add New Item dialog, enter HelloWorldController.
[!INCLUDEadding-controller2]
In Visual Studio, in non-debug mode (Ctrl+F5), you don't need to build the app after changing code. Just save the file, refresh your browser and you can see the changes.