日期:2014-05-18 浏览次数:20462 次
<asp:table id=table1 runat=server> <asp:tablerow> <asp:tablecell id=newbtn runat=server> //注意这个id . .
System.Web.UI.WebControls.Button btnlastYV = new System.Web.UI.WebControls.Button(); btnlastYV.Text = "OK"; btnlastYV.ID = "btnlastYV"; btnlastYV.Click +=new EventHandler(btnlastYV_Click); newbtn.Controls.Add(btnlastYV); //添加button到cell
onMouseOver="this.style.backgroundColor='#E1E8E8';return true;" onMouseOut="this.style.backgroundColor='#fbfbfb';"
newbtn.Attributes.Add("onMouseOver", "this.style.backgroundColor='#E1E8E8';return true;"); newbtn.Attributes.Add("onMouseOut","this.style.backgroundColor='#fbfbfb';")