I have implement a link list generate in view and each link is redirect to different website, when i click the link, it will redirect to the format as below:MVC <a href> redirect to other website?
我想要什麼:
www.google.com
我的代碼:
@for (int x = 0; x < Model[i].Url_Address.Count(); x++)
{
<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<a href="@Model[i].Url_Address[x]" class="list-group-item">@Model[i].Url_Name[x]</a>
</div>
</div>
}
是,我需要先通過它的動作在控制器中重定向到網頁?如果我錯了,請糾正我。高度讚賞!
不,noo需要那個,你在做什麼看起來正確 –