我在将 Style 属性添加到 UserControl 时遇到了困难。当我尝试查看消费者页面时出现解析器异常。
private Style _headerStyle = new Style();
public Style HeaderStyle
{
get { return _headerStyle ; }
set
{
_headerStyle .CopyFrom(value);
}
}
用法:
Style="border: 1px solid blue;"
错误:
Cannot create an object of type 'System.Web.UI.WebControls.Style' from its string representation ...