1.1 KiB
1.1 KiB
title | author | description | manager | ms.author | ms.date | ms.prod | ms.technology | ms.topic | 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. | wpickett | riande | 02/28/2017 | asp.net-core | aspnet | get-started-article | 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.