protected void btnDeletePdfFile_Click(object sender, EventArgs e) { SuccessStories ss = new SuccessStories(); if (ss.DeletePdfFile(LangCode, GroupID)) { ImageButton btnDeletePdfFile = this.DetailsViewEditItem.FindControl("btnDeletePdfFile") as ImageButton; if (btnDeletePdfFile != null) { btnDeletePdfFile.Visible = false; } Button b = this.DetailsViewEditItem.FindControl("PdfName") as Button; if (b != null) { b.Visible = false; } } }