HTML扩展类的所有方法都有2个参数:以textbox为例子public static string TextBox( this HtmlHelper htmlHelper, string name, Object value, IDictionary<string, Object> htmlAttributes )public static string TextBox( this HtmlHelper htmlHelper, string name, Object value, Object htmlAttributes )这2个参数代表这个html标签的属性集合。使用方法如下 Read More
View Code 1 public static class MVCHelpers 2 { 3 public static string Table(this HtmlHelper helper, string name, IList items, IDictionary<string, object> attributes) 4 { 5 if (items == null || items.Count == 0 || string.IsNullOrEmpty(name)) 6 { 7 ... Read More