Code
protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='purple'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='white'");
e.Row.Attributes.Add("onclick", "javascrpit:window.open('Midlle.aspx?TaskID=" + e.Row.Cells[1].Text + "&TaskName=" + e.Row.Cells[2].Text + "')");
}
}
posted @
2009-05-07 21:34
周宏伟
阅读(
1962)
评论()
编辑
收藏
举报