string id; id=GridView1.DataKeys[e.RowIndex].Value.ToString(); cmd.CommandText = "delete from room_allotment where Student_id='" + id + "'"; conn.Open(); int x = cmd.ExecuteNonQuery(); conn.Close(); if (x > 0) { DataBind(); } else { lblmsg.Text = "Error..Plz try again"; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)