ActionButton代替ActionLink的 [英] ActionButton instead of ActionLink
本文介绍了ActionButton代替ActionLink的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个按钮,点击它时,调用一个动作。我已经使用 Html.ActionLink
以创建一个链接,正是这么做的,但没有 Html.ActionButton
。是否有一些其他的方式?
解决方案
有一些其他的方式?
块引用>您可以使用HTML
<形式为GT;
:@using(Html.BeginForm(someAction,someController))
{
<按钮式=提交>确定< /按钮>
}I want to create a button which when clicked calls an action. I have used
Html.ActionLink
to create a link which does exactly that but there is noHtml.ActionButton
. Is there some other way?解决方案Is there some other way?
You could use a html
<form>
:@using (Html.BeginForm("someAction", "someController")) { <button type="submit">OK</button> }
这篇关于ActionButton代替ActionLink的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文