protected void btnnew_Click(object sender, EventArgs e) { Whitfield_Project _wc = new Whitfield_Project(); _wc.DeleteProjectCompe(Convert.ToInt32(ViewState["EstNum"].ToString()), Convert.ToInt32(ViewState["twc_project_number"].ToString())); for (int i = 0; i < ChkProjContacts.Items.Count; i++) { if (ChkProjContacts.Items[i].Selected) _wc.PopulateProject_compe(Convert.ToInt32(ViewState["EstNum"].ToString()),Convert.ToInt32(ViewState["twc_project_number"].ToString()), Convert.ToInt32(ChkProjContacts.Items[i].Value)); } //lblMsg.Text = "Your record is added successfully."; Response.Write("<script language='javascript'>parent.location.replace('Whitfield_projectInfo.aspx?EstNum=" + ViewState["EstNum"].ToString() + "&twc_project_number=" + ViewState["twc_project_number"].ToString() + "');</script>"); }