在我的一个观点中,我有一个下拉列表,如下所示:
<div id="CurrentExchange" style="position:absolute; right:150px; top:250px;">
<h3>Select an Exchange</h3>
<select>
<option value="Bicycle" selected>Bicycle Exchange</option>
<option value="Tennis">Tennis Exchange</option>
</select>
</div>
在同一视图的其他地方,我有一个操作链接,如下所示:
@Html.ActionLink("click here", "Index", "BicycleSellerListing")
我想做什么,但不知道如何(我对 MVC 和 HTML 很陌生)是这样的,在伪代码中:
if CurrentExchange = "Bicycle"
@Html.ActionLink("click here", "Index", "BicycleSellerListing")
else if CurrentExchange = "Tennis"
@Html.ActionLink("click here", "Index", "TennisSellerListing")
else if ...