繁体   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