protected void btnDelete_Click(object sender, EventArgs e) { string userid = hfCode.Value; u.DeleteUser(Convert.ToInt32(userid)); BindGrid(); System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append(@"<script type='text/javascript'>"); sb.Append("alert('Record deleted Successfully');"); sb.Append("$('#deleteModal').modal('hide');"); sb.Append(@"</script>"); ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "delHideModalScript", sb.ToString(), false); }