1.0 KiB
1.0 KiB
title | author | description | ms.author | ms.date | uid |
---|---|---|---|---|---|
Add a controller to an ASP.NET Core MVC app | rick-anderson | Learn how to add a controller to a simple ASP.NET Core MVC app. | riande | 02/28/2017 | tutorials/first-mvc-app/adding-controller |
Add a controller to an ASP.NET Core MVC app
[!INCLUDE adding-controller1]
- In Solution Explorer, right-click Controllers > Add > New Item
- Select Controller Class
- In the Add New Item dialog, enter HelloWorldController.
[!INCLUDE adding-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.