本文是我在书上抄的
我们需要在服务器端定义一个表示控件信息的类:ControInfo,完整代码如下.
Public class ControlInfo
{
private string _name;
private string _description;
private int _id;
[DataObjectField(true, true)]
public int Id
{
get { return _id; }
set { _id = value; }
}
[DataObjectField(false)]
[DefaultValue("New Control")]
publish string Name
{
get { return _name; }
set { _name = value; }
}
[DataObjectField(false)]
[DefaultValue("Default Description")]
public string Description
{
get { return _description; }
set { _description = value; }
}
public ControlInfo()
{
_id = -1;
}
public ControlInfo(int id, string name, string description)
{
_id = id;
_name = name;
_description = description;
}
转载于:https://www.cnblogs.com/csharps/archive/2008/04/17/1157883.html