private void LoadBusinessCode() { DataTable dt = XMLBo.GetBusinessType(path); ddlBusinessType.DataSource = dt; ddlBusinessType.DataValueField = dt.Columns["BusinessTypeCode"].ToString(); ddlBusinessType.DataTextField = dt.Columns["BusinessType"].ToString(); ddlBusinessType.DataBind(); ddlBusinessType.Items.Insert(0, new ListItem("Select a Business Type", "Select a Business Type")); }
private void BindDropDowns(string path) { // Bind Business Type Drop Downs dt = XMLBo.GetBusinessType(path); ddlBusinessType.DataSource = dt; ddlBusinessType.DataTextField = "BusinessType"; ddlBusinessType.DataValueField = "BusinessTypeCode"; ddlBusinessType.DataBind(); ddlBusinessType.Items.Insert(0, new ListItem("Select a Business Type", "Select a Business Type")); dtStates = XMLBo.GetStates(path); ddlState.DataSource = dtStates; ddlState.DataTextField = "StateName"; ddlState.DataValueField = "StateCode"; ddlState.DataBind(); ddlState.Items.Insert(0, new ListItem("Select a State", "Select a State")); }