gridview模版列设置鼠标移过时背景图片

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            HtmlTable tb = (HtmlTable)e.Row.FindControl("tb1");
          
           
          string tb_bg="background=\"img/pic_zwgk.jpg\"";
         
      
          
          
          
            tb.Attributes.Add("onmouseover", tb_bg);
            tb.Attributes.Add("onmouseout", "background=\"\"");
        }
  
    }
原文地址:https://www.cnblogs.com/fubeidong/p/530726.html