【发布时间】:2011-01-20 12:49:37
【问题描述】:
我根据How do you build an ASP.NET custom control with a collection property? 上的示例创建了一个带有集合属性的自定义控件
当控件被添加到一个常见的 ASP.Net aspx 页面时,它会按预期工作。但是,当添加到 Sharepoint 中的页面布局时,会引发以下错误:
无法将“System.Web.UI.CollectionBuilder”类型的对象转换为“System.Collections.Generic.List`1[mytypes.mytype]”类型。
该代码与上面链接中显示的示例提供的代码几乎相同。我认为问题不在于控件,因为它在普通的 Web 项目中运行良好。
【问题讨论】:
标签: sharepoint custom-controls