c#光棒效果

来源:互联网 发布:aftereffects mac破解 编辑:程序博客网 时间:2024/04/27 14:17

 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("onmouseover", "co=this.style.backgroundColor;this.style.backgroundColor='#6699FF'");
            e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=co");
        }
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            LinkButton li = e.Row.FindControl("LinkButton1") as LinkButton;
            li.Attributes.Add("onclick", "return confirm('你确定要删除吗?')");
        }
    }
<PIXTEL_MMI_EBOOK_2005>2                                                           </PIXTEL_MMI_EBOOK_2005>