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.
Comments (
)
Link to this page:
//www.vb-net.com/AspNet-DocAndSamples-2017/aspnetcore/tutorials/first-mvc-app/adding-controller.htm
|