1、PlaceHolder
ph.Controls.Add(hl); 添加控件
2、控件,对象添加自定义属性
Button1.Attributes.Add("onmouseover", "this.styl.backgroundColor='#00ffcc'");
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#00ffcc'"); 行对象添加自定义属性
转载于:https://www.cnblogs.com/net123/archive/2008/02/01/1061939.html