在我看来,我有以下是我的主页:
@Html.ActionLink("OVERVIEW", "List", "Items", null, new { @class = "navItem" })
我有一个徽标,我想让它点击它,一旦点击指向我主页(上面的那个),以下不起作用,任何建议?:
<div class="nav-primary">
<a @{Response.Redirect("OVERVIEW"); } > <img src="@Url.Content("~/Content/Images/theLogo.png")" /></a>
</div>
答案 0 :(得分:3)
尝试,
<div class="nav-primary">
<a href="@Url.Action("OVERVIEW", "List")"> <img src="@Url.Content("~/Content/Images/theLogo.png")" /></a>
</div>