protected void GrdBlogList_RowCommand(object sender, GridViewCommandEventArgs e) { int id = 0; if (e.CommandName == "Deleterec") { id = Convert.ToInt32(e.CommandArgument); int result = clsobj.DeleteSold(id); FillGridData(); } else if (e.CommandName == "Editrec") { id = Convert.ToInt32(e.CommandArgument); DataTable dt = new DataTable(); dt = clsobj.GetExclusiveDetail(id); txtName.Text = dt.Rows[0]["Title"].ToString(); hdnImg.Value = dt.Rows[0]["ImageUrl"].ToString(); imgbanner.ImageUrl = "/admin/uploadfiles/" + dt.Rows[0]["ImageUrl"].ToString(); txtDescription.Text = dt.Rows[0]["Description"].ToString(); imgbanner.Visible = true; FillGridData(); } else { FillGridData(); } }