页面属性传值
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
public class UserControlRenderingPropertyAttribute : Attribute
{
string _key;
public string Key
{
get { return _key; }
set { _key = value; }
}
}
在UC控件中传直
private string _CheckID = string.Empty;
[UserControlRenderingProperty(Key = "OpType")]
public string CheckID
{
get
{
return this._CheckID;
}
set
{
this._CheckID = value;
}
}