简体   繁体   中英

ASP.NET MVC 5 bootstrap button move to another view page

I want to move to another page from current

My View

<p class="btn btn-primary btn-lg">@Html.ActionLink("More information", "GoToApps") More information! &raquo;</p>

However my button have link from method ActionLink and string "More information". How is method without linkText ?

My method in controller:

public ActionResult GoToApps()
    {
        return RedirectToAction("IndexApps", "Apps");
    }

This way is run, but I want better display. Cheers,

如果仅需要链接,则应使用@Url.Action("GoToApps")

<form action="@Html.ActionLink("More information", "GoToApps")">
<button type="button" class="btn btn-primary btn-lg"> More information! &raquo;</button>
</form>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM