添加鼠标通过单击GridView的事件线的一个小例子
protected void gridview1_rowdatabound(object sender,GridViewRowEventArgs E)
{
E.Row.Attributes.Add(onmouseover
E.Row.Attributes.Add(onmouseout
E.Row。属性{风格=鼠标手;
int数= gridview1.rows.count;
字符串id;
对于(int = i 0;i <计数;i + +)
{
ID =查询。DataKeys {我}。value.tostring();
查询。行{我}。attributes.add(onclick
}
}