GridView 行单击或双击事件绑定
protected void gvTeacherTaskList_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "ShowDetail") { } } protected void gvTeacherTaskList_DataBound(object sender, EventArgs e) { foreach (GridViewRow row in gvTeacherTaskList.Rows) { var btnShowDetail = row.FindControl("btnShowDetail") as Button; row.Attributes.Add("ondblclick", ClientScript.GetPostBackEventReference(btnShowDetail, null)); } }
桂棹兮兰桨,击空明兮溯流光。