【发布时间】:2011-02-03 21:29:46
【问题描述】:
我有以下方法:
public static string UlList(this HtmlHelper helper, List<IEntity> entities, string css)
{
return "foo";
}
但是当我尝试调用该方法时
<%= Html.UlList(Model.ProfileRequiredFields, css)%>
我明白了:
编译器错误消息:CS1928:“System.Web.Mvc.HtmlHelper”不包含“UlList”的定义和最佳扩展方法重载“System.Web.Mvc.HtmlHelpers.UlList(System.Web.Mvc. HtmlHelper, System.Collections.Generic.List, string)' 有一些无效参数
Model.RequiredFields = new List<ProfileRequiredField>();
public class ProfileRequiredField : IEntity
{
public int Id { get; set; }
public string Name { get; set; }
}
编辑 我正在使用 3.5
【问题讨论】:
标签: c# asp.net-mvc-2