protected void btnSave_Click(object sender, EventArgs e) { adminTableAdapters.LoanTypesTableAdapter loanTypes = new adminTableAdapters.LoanTypesTableAdapter(); if (!(type == "update")) { loanTypes.InsertLoanTypes(txtDescription.Value.Trim()); } else if (type == "update") { loanTypes.UpdateLoanType(txtDescription.Value.Trim(), id); } Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "ltedit")); }