[英]ASP.NET MVC 5 bootstrap button move to another view page
我想從當前位置移到另一頁
我的觀點
<p class="btn btn-primary btn-lg">@Html.ActionLink("More information", "GoToApps") More information! »</p>
但是,我的按鈕具有來自方法ActionLink的鏈接和字符串“更多信息”。 沒有linkText的方法如何?
我在控制器中的方法:
public ActionResult GoToApps()
{
return RedirectToAction("IndexApps", "Apps");
}
這種方式可以運行,但是我想要更好的顯示。 干杯,
如果僅需要鏈接,則應使用@Url.Action("GoToApps")
<form action="@Html.ActionLink("More information", "GoToApps")">
<button type="button" class="btn btn-primary btn-lg"> More information! »</button>
</form>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.