Finished 'Views in ASP.NET MVC Application'
This commit is contained in:
parent
a556642489
commit
483fe19002
@ -9,9 +9,9 @@ namespace FirstMVCDemo.Controllers
|
||||
public class HomeController : Controller
|
||||
{
|
||||
// GET: Home
|
||||
public string Index(string id, string name)
|
||||
public ActionResult Index()
|
||||
{
|
||||
return "Id = " + id + ", Name = " + Request.QueryString["name"];
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
@ -102,6 +102,7 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\web.config" />
|
||||
<None Include="packages.config" />
|
||||
<Content Include="Views\Home\Index.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
@ -112,7 +113,6 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
<Folder Include="Models\" />
|
||||
<Folder Include="Views\Home\" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
|
18
FirstMVCDemo/Views/Home/Index.cshtml
Normal file
18
FirstMVCDemo/Views/Home/Index.cshtml
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Index</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1>Index View Coming From Views/Home Folder</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user