protected void btnedit_click(object sender, EventArgs e) { string value = hfdselid.Value; Person_Details.TBL_Licensing_Employer obj = Utilities_Licensing.EditEmployer(Convert.ToInt32(value)); hfdemployeeid.Value = obj.Employer_Id.ToString(); txt_Name.Text = obj.Employer_Name; txt_employeetype.Text = obj.Employer_Type; txt_address.Text = obj.Address; string state = ""; state = obj.State.ToString(); if (ddlstate.Items[0].Text != state) { ddlstate.Items[0].Selected = false; if (ddlstate.Items.FindByValue(state) != null) { ddlstate.Items.FindByValue(state).Selected = true; } } string county = ""; county = obj.County.ToString(); if (ddlcounty.Items[0].Text != county) { ddlcounty.Items[0].Selected = false; if (ddlcounty.Items.FindByValue(county) != null) { ddlcounty.Items.FindByValue(county).Selected = true; } } //ddlstate.SelectedValue = obj.State; //ddlcounty.SelectedValue = obj.County; txt_city.Text = obj.City; txt_zip.Text = obj.Zip; string js = "Popup();"; ScriptManager.RegisterStartupScript(Page, GetType(), "scr", js, true); }