GridView页面跳转
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//当鼠标停留时更改背景色
e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#9CCBF7';this.style.cursor='hand'");
//当鼠标移开时还原背景色
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
// string strId = GridView1.DataKeys[e.Row.RowIndex].Value.ToString();
e.Row.Attributes.Add("onclick", "window.open(XX.aspx?CODE=" + GridView1.DataKeys[e.Row.RowIndex].Value + "')");
// }
}
这个事件怎么点击跳转不了????