.net – 没有@ Html.Button!

这是奇怪的。我看到参考的@ Html.Button(),但当我输入Intellisense没有找到这样的帮助…有下拉列表,隐藏,编辑等等,但没有按钮!

这是什么?

public static class HtmlButtonExtension 
{

  public static MvcHtmlString Button(this HtmlHelper helper, 
                                     string innerHtml, 
                                     object htmlAttributes) 
  { 
    return Button(helper, innerHtml,
                  HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes)
    ); 
  }

  public static MvcHtmlString Button(this HtmlHelper helper, 
                                     string innerHtml,
                                     IDictionary<string, object> htmlAttributes)
  {
      var builder = new TagBuilder("button");
      builder.InnerHtml = innerHtml;
      builder.MergeAttributes(htmlAttributes);
      return MvcHtmlString.Create(builder.ToString());
  }
}
http://stackoverflow.com/questions/5955571/theres-no-html-button

本站文章除注明转载外,均为本站原创或编译
转载请明显位置注明出处:.net – 没有@ Html.Button!