需要帮助Func <dynamic,helperresult> </dynamic,helperresult>

时间:2014-05-16 21:56:20

标签: c# asp.net-mvc-4

我有以下声明。当我调用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>

0 个答案:

没有答案