GridView中双击某一行时跳转到另外一个页面
GridView中可以这样写
protected void grvList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "c=style.backgroundColor;style.backgroundColor='#add8e6'");
e.Row.Attributes.Add("onmouseout", "style.backgroundColor=c");
//double click
string strId = grvList.DataKeys[e.Row.RowIndex].Value.ToString();
e.Row.Attributes.Add("ondblclick", "location.href='test.aspx?Id=" + strId + "'");
e.Row.Attributes["style"] = "Cursor:hand";
}
}