簡體   English   中英

ASP.NET MVC 5引導程序按鈕移到另一個視圖頁

[英]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! &raquo;</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! &raquo;</button>
</form>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM