我可以写表单,它的内容如下:
@using(Ajax.BeginForm(...)){
// html content here
}
渲染为:
<form>
// html content here
</form>
有没有可能用Ajax.ActionLink做同样的事情?
@using(Ajax.ActionLink(...)){
// html content here
}
渲染:
<a>
// html content here
</a>
发布于 2013-06-04 15:08:23
不,你不能,Ajax.ActionLink返回MvcHtmlString,它不是一次性的。
您可以像在此extension method example中那样自己创建链接。
https://stackoverflow.com/questions/16920250
复制