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
posted @ 2012-03-04 22:43 ミ茹此茹此↘ Views(157) Comments(0) Diggs(0) Edit
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
posted @ 2012-03-04 22:37 ミ茹此茹此↘ Views(240) Comments(0) Diggs(0) Edit