Here is my code for grid row delete using link button but after click its deleted data after page refresh I want delete data on the page without refresh the page i also put update panel in my grid here is my code
protected void gvContent_RowCommand(object sender, GridViewCommandEventArgs e)
{
if(e.CommandName=="modify")
{
GridViewRow row =
(GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
// this find the index of row:
int RowIndex = row.RowIndex;
//this store the value in varName1:
int id = Convert.ToInt32(
((Label)row.FindControl("lblContentId")).Text.ToString());
Response.Redirect("ContentManage.aspx?ContentId=" +Convert.ToInt32(id));
}
if (e.CommandName == "delete")
{
GridViewRow row = (GridViewRow)
(((LinkButton)e.CommandSource).NamingContainer);
// this finds the index of row:
int RowIndex = row.RowIndex;
//this stores the value in varName1:
int id = Convert.ToInt32(
((Label)row.FindControl("lblContentId")).Text.ToString());
Content_Data.DeleteContentDetails(id);
BindGrid();
UpdatePanel1.Update();
}