Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何使用Razor重定向到主页_C#_Asp.net Mvc_Razor - Fatal编程技术网

C# 如何使用Razor重定向到主页

C# 如何使用Razor重定向到主页,c#,asp.net-mvc,razor,C#,Asp.net Mvc,Razor,在我看来,以下是我的主页: @Html.ActionLink("OVERVIEW", "List", "Items", null, new { @class = "navItem" }) 我有一个logo,我想让它可以点击,一旦点击直接进入主页(上面的一个),以下不起作用,有什么建议吗 <div class="nav-primary"> <a @{Response.Redirect("OVERVIEW"); } > <img src="@Url.Co

在我看来,以下是我的主页:

 @Html.ActionLink("OVERVIEW", "List", "Items", null, new { @class = "navItem" })
我有一个logo,我想让它可以点击,一旦点击直接进入主页(上面的一个),以下不起作用,有什么建议吗

<div class="nav-primary">
    <a @{Response.Redirect("OVERVIEW"); } >   <img src="@Url.Content("~/Content/Images/theLogo.png")" /></a>
</div>

试试看


<div class="nav-primary">
    <a href="@Url.Action("OVERVIEW", "List")">   <img src="@Url.Content("~/Content/Images/theLogo.png")" /></a>
</div>