, Controller, , ProductController, ShopController. - , , HTML, ( Product), MVC Framework Controller .
, IControllerFactory.
:
/Views/, , ProductController, /Views/Product. , Controller Views , .. /Views/Product, /Views/ProductController. , .
MVC Framework , . , , List(), List.cshtml. , , List() ProductController /Views/Product/List.cshtml.
View() , :
returnView();:
returnView("MyOtherView");, . MVC Framework , , /Views/Shared. , , , /Views/Shared .
_, /Views/Shared. VisualStudio Layout.cshtml Empty. /Views/_ViewStart.cshtml. , , _ViewStart.cshtml ( ), , :
@{ Layout = "~/Views/Shared/MyLayout.cshtml";}:
@{Layout = null;}ASP.NET MVC
, , , . ASP.NET MVC Framework. , , ASP.NET MVC. . - MVC, .
|
|
VisualStudio
VisualStudioExpress , , MVC Framework, , . , ExpertSettings ( ) Tools -->Settings ( -->) VisualStudio.
Microsoft , VisualStudio , .. Tools TOOLS. , .
ASP.NET MVC
MVC Framework VisualStudio. File NewProject ( ), NewProject. Web Visual C# ASP.NET WebApplication (- ASP.NET). , :
PartyInvites . , ASP.NET. Microsoft ASP.NET .
MVC , , . : Empty () MVC Addfoldersandcorereferencesfor ( ), . MVC , , . , .
ASP.NET. , , . - MVC, Empty.
VisualStudio , SolutionExplorer . MVC , , VisualStudio
, Debug () StartDebugging ( ); , . . Empty, , , 404 NotFound ( ):
, , , VisualStudio Debug StopDebugging ( ).
|
|
, VisualStudio . InternetExplorer, , . , , - .
, , GoogleChrome 38, .