我可以编写这样的表单及其内容:
@using(Ajax.BeginForm(...)){
// html content here
}
渲染为:
<form>
// html content here
</form>
是否可以对 Ajax.ActionLink 执行相同的操作?
@using(Ajax.ActionLink(...)){
// html content here
}
渲染:
<a>
// html content here
</a>
最佳答案
不,你不能,Ajax.ActionLink 返回 MvcHtmlString这不是一次性的。
您可以自己创建链接,如 extension method example 所示.
关于c# - 一次性 Ajax.ActionLink,如 Ajax.BeginForm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16920250/