I am working in MVC, chtml and C# and slowly making progress on the project that I am working on - however, the details of the model is showing at the top of the view as System.Collections.Generic.List1
and cannot find why it should do so.
The Rest of the view is working fine.
How to sort this issue?
Top of the View:
@Model BB2020MVC.Models.RaceNames;
<div><h2>All Races</h2></div>
Partial View - Navigation Bar:
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Main")</li>
<li>@Html.ActionLink("Base Teams", "Index", "BaseTeams")</li>
<li>@Html.ActionLink("Rules", "Index", "BaseRules")</li>
<li>@Html.ActionLink("Rosters", "Index", "Rosters")</li>
</ul>
</div>
</div>
</div>
And the Layout
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
@{Html.RenderAction(actionName: "Navbar", controllerName: "Main");}
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now.Year - My ASP.NET Application</p>
</footer>
</div>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</body>
</html>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…