public class Bull: System.Web.UI.UserControl {private string _strID; // custom property value MID public string IMID {get {return _strID;} set {_strID = value;}} private string _strPageSize; // custom property the number of display public string IPageSize {get {return _strPageSize;} set {_strPageSize = value;}} public string _strLineTitle; // the line head public string ILineTitle {get {return _strLineTitle;} set {_strLineTitle = value;}} public string IForeColor { set {DLTNews.AlternatingItemStyle.ForeColor = Color.FromName (value);}} public string IBackColor {set {DLTNews.AlternatingItemStyle.BackColor = Color.FromName (value);}} protected System.Web.UI.WebControls.DataList DLTNews; private void Page_Load (object sender, System.EventArgs e) {if (Page.IsPostBack!) {new Sql.TSqlDB () BindDataList ( "Psp_ShowBulletinInfoList" IPageSize "," IMID, DLTNews);.}} ...} Front desk
/ font> "ibackcolor =" # ff0000 "> This example mainly demonstrates the attribute definition, negative value, and use of the web custom component.