Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要"BeginForm"在第一个开始"if(){}"和第二个“BeginForm”结束"if(){}"
"BeginForm"
"if(){}"
像这样
if (true) { @Html.Raw("<form>"); } .. if (true) { @Html.Raw("</form>"); }
如何使用 Ajax.BeginForm() 来做到这一点?
尝试以下操作:
if (true) { @Html.Raw("<form data-ajax="true" data-ajax-mode="replace">"); } .. if (true) { @Html.Raw("</form>"); }