Adding a controller to a ASP.NET Core MVC app with Visual Studio
[!INCLUDEadding-controller1]
- In Solution Explorer, right-click Controllers > Add > New Item
![Contextual menu](/AspNet-DocAndSamples-2017/aspnetcore/tutorials/first-mvc-app/adding-controller/_static/add_controller.png)
- Select MVC Controller Class
- In the Add New Item dialog, enter HelloWorldController.
![Add MVC controller and name it](/AspNet-DocAndSamples-2017/aspnetcore/tutorials/first-mvc-app/adding-controller/_static/ac.png)
[!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 (
)
![](http://forum.vb-net.com/GetTopicCount.png?id=e36eb3af-15a2-4ca2-b1bb-53d2b7c2b60d)
<00>
<01>
<02>
<03>
<04>
<05>
<06>
<07>
<08>
<09>
<10>
<11>
<12>
<13>
<14>
<15>
<16>
<17>
<18>
<19>
<20>
<21>
<22>
<23>
Link to this page:
//www.vb-net.com/AspNet-DocAndSamples-2017/aspnetcore/tutorials/first-mvc-app/adding-controller.htm
<SITEMAP> <MVC> <ASP> <NET> <DATA> <KIOSK> <FLEX> <SQL> <NOTES> <LINUX> <MONO> <FREEWARE> <DOCS> <ENG> <CHAT ME> <ABOUT ME> < THANKS ME> |