protected void btnDelete_Click(object sender, EventArgs e) { dsUsers dsDeleteUser; string tempPath = Server.MapPath("~/App_Data/"); clsBusinessLayer businessLayerObj = new clsBusinessLayer(tempPath); try { dsDeleteUser = businessLayerObj.RemoveUser(txtUsername.Text); if (dsDeleteUser.tblUsers.Rows.Count > 0) { Master.UserFeedBack.Text = "User Deleted"; } else { Master.UserFeedBack.Text = "User Deleted"; } btnExport.Visible = false; btnUpdate.Visible = false; btnDelete.Visible = false; } catch (Exception error) { string message = "Something went wrong..."; Master.UserFeedBack.Text = message + error.Message; } }