15.1.2 Creating the View; Listing 15-4 The Contents of the ActionName.cshtml File

chap15
Jason Zhu 2021-10-01 00:01:31 +10:00
parent afb82add7b
commit 9b99afe3d3
2 changed files with 22 additions and 0 deletions

View File

@ -103,6 +103,7 @@
<ItemGroup>
<Content Include="Views\web.config" />
<None Include="packages.config" />
<Content Include="Views\Shared\ActionName.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>

View File

@ -0,0 +1,21 @@

@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>ActionName</title>
</head>
<body>
<div>
The controller is: @ViewBag.Controller
</div>
<div>
The action is: @ViewBag.Action
</div>
</body>
</html>