public void city() { if (con.State == ConnectionState.Closed) { con.Open(); } SqlCommand cmd = new SqlCommand("select distinct area from product", con); SqlDataReader dr = cmd.ExecuteReader(); BulletedList2.DataSource = dr; BulletedList2.DataTextField = "area"; BulletedList2.DataValueField = "area"; BulletedList2.DataBind(); con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)