8.1.3.1 Creating the Navigation Controller; Listing 8-5 Adding The Menu Action Method to the NavController.cs File

chap08
Jason Zhu 2021-09-08 22:12:51 +10:00
parent 56838b589e
commit 5b697839e7
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace SportsStore.WebUI.Controllers
{
public class NavController : Controller
{
public string Menu()
{
return "Hello from NavController";
}
}
}

View File

@ -130,6 +130,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="App_Start\NinjectWebCommon.cs" /> <Compile Include="App_Start\NinjectWebCommon.cs" />
<Compile Include="App_Start\RouteConfig.cs" /> <Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="Controllers\NavController.cs" />
<Compile Include="Controllers\ProductController.cs" /> <Compile Include="Controllers\ProductController.cs" />
<Compile Include="Global.asax.cs"> <Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon> <DependentUpon>Global.asax</DependentUpon>
@ -157,6 +158,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="App_Data\" /> <Folder Include="App_Data\" />
<Folder Include="Views\Nav\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\SportsStore.Domain\SportsStore.Domain.csproj"> <ProjectReference Include="..\SportsStore.Domain\SportsStore.Domain.csproj">