做DG鼠标放上去变色效果时,老是提示说少了this?????代码是这样的private void DG_Notice_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{e.Item.Attributes.Add("OnMouseOut", "this.style.backgroundColor='White';this.style.color='#003399'");
e.Item.Attributes.Add("OnMouseOver", "this.style.backgroundColor='#6699FF';this.style.color='#8C4510'");}
说是51行少了结束符!!!! 以下是50行到59行的代码
private void InitializeComponent()
{
this.DG_Notice.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.DG_Notice_DeleteCommand);
this.DG_Notice.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.DG_Notice_ItemDataBound);
this.DG_Notice.SelectedIndexChanged += new System.EventHandler(this.DG_Notice_SelectedIndexChanged);
this.Confrom1.ServerChange += new System.EventHandler(this.Confrom1_ServerChange);
this.Load += new System.EventHandler(this.Page_Load); }HTML页里我只有49行呀!!!!!
{e.Item.Attributes.Add("OnMouseOut", "this.style.backgroundColor='White';this.style.color='#003399'");
e.Item.Attributes.Add("OnMouseOver", "this.style.backgroundColor='#6699FF';this.style.color='#8C4510'");}
说是51行少了结束符!!!! 以下是50行到59行的代码
private void InitializeComponent()
{
this.DG_Notice.DeleteCommand += new System.Web.UI.WebControls.DataGridCommandEventHandler(this.DG_Notice_DeleteCommand);
this.DG_Notice.ItemDataBound += new System.Web.UI.WebControls.DataGridItemEventHandler(this.DG_Notice_ItemDataBound);
this.DG_Notice.SelectedIndexChanged += new System.EventHandler(this.DG_Notice_SelectedIndexChanged);
this.Confrom1.ServerChange += new System.EventHandler(this.Confrom1_ServerChange);
this.Load += new System.EventHandler(this.Page_Load); }HTML页里我只有49行呀!!!!!
解决方案 »
- 关于c#和access日期类型的问题 求高手
- 单件模式的基Form,两个继承它的窗口,实例化时一个窗口,另一个窗口无法实例化了。
- 怎么实现一个自定义类型到Stream类型的强转换?
- 关于输入法超级难的问题,高手进来帮忙
- 怎么捕获语音??
- MDI子窗体最大化问题。。。
- new Excel.Application() 出错
- StreamWriter资源无法释放
- hasttable类型怎么转换为 Dictionary<string, EntityHelper> ?
- c#如何实现copy目录到另一个目录下面(在线等待,谢谢)
- 高手请进,dataGrid真的可以绑定所有实现 IList 的对象?我的例子怎么不行。
- winform中c#复合自定义控件的问题
if ( e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
yourCode...