0
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
Label lblEmpID = (Label)GridView1.Rows[e.RowIndex].FindControl("Label1"); //This is Table Id load on Label1
conn.Open();
string cmdstr = "delete from LUMHS_CHALLAN_FEE where [email protected]";
SqlCommand cmd = new SqlCommand(cmdstr, conn);
cmd.Parameters.AddWithValue("@ID", lblEmpID.Text);
cmd.ExecuteNonQuery();
conn.Close();
ShowStudentInfo(); /back to load Grid view Function
}
我想從GridView中刪除行,我寫了這個代碼,但行不能刪除,請幫我刪除行從GridView的在asp.net