protected void load_customer() { using (MySqlConnection con = new MySqlConnection(constr)) { using (MySqlCommand cmd = new MySqlCommand("SELECT concat(firstname, ' ', lastname) as FullName, CustNo FROM tblcustomer order by CustNo")) { cmd.CommandType = CommandType.Text; cmd.Connection = con; con.Open(); ddCustomer.DataSource = cmd.ExecuteReader(); ddCustomer.DataTextField = "FullName"; ddCustomer.DataValueField = "CustNo"; ddCustomer.DataBind(); con.Close(); } } ddCustomer.Items.Insert(0, new ListItem("--Select Customer--", "0")); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)