I've got 3 links in the header of a .net C# MVC, with the following .cshtml file:<a href> to external link returns link/Error in webapp, even though the server is not dead
<div id="header">
<div id="manag-nav">
<a class="manag-page" href="https://EXAMPLE-LINK.com/Account">@Resources.label-A</a>
<a class="manag-page" href="https://backoffice.EXAMPLE-LINK.com/Sitefinity">@Resources.label-B</a>
<a class="manag-page website-page" href="http://www.EXAMPLE-LINK.com">@Resources.label-C</a>
</div>
<div id="logo">
<img src="@Url.Content("~/Content/Images/logo.png")" alt="" />
</div>
<div id="user-login">
</div>
Label1 and label3 links work fine, but my 2nd link, label2, when you click it, it returns "http://backoffice.blabla.com/Error“而不是” http://backoffice.blabla.com/Sitefinity”。
有没有人有这为什么发生任何想法?
我忘了提,当我直接去这个链接,它的工作原理。或者当我写的链接这个网址在一个简单的.html文件中,它也可以工作,它只是停止在项目中工作
这是因为该URL已死且服务器正在重定向您。这与你的代码无关 - 除了有一个错误的URL –
当我尝试它时,它已经死了 –
服务器没有死,因为如果我使用记事本在简单的.html文件中插入这段代码,它会转到该链接没有任何问题。 但是,如果我将这个链接插入到我的.cshtml文件项目中,它将返回带有/ Error的链接,这真的很奇怪。 – Hayleekin