我有以下声明。当我调用commitButton(null)
时,我希望它生成下面的html节目Func<dynamic, HelperResult> commitButton =
(
@<span class="float-right">
@using ( Html.BeginForm( "CommitChanges" , "Commit" ) )
{
<button type="button" class="commit-button">
<span></span>
@ResourceString.CommitChanges
</button>
}
</span>
) ;
当我调用commitButton(null)时 预期结果应该像
<span class="float-right">
<form action="Commit/CommitChanges" method="POST"><button type="button" class="commit-button"><span></span> Commit Changes </button></form>
</span>
但实际结果是
<span class="float-right">
<button type="button" class="commit-button"><span></span> Commit Changes </button>
</span>