protected void Page_Load(object sender, EventArgs e) { con.Open(); string s = "Select distinct IPAddress from Machines order by IPAddress"; SqlDataAdapter da = new SqlDataAdapter(s, con); DataSet ds = new DataSet(); da.Fill(ds); DropDownList1.DataTextField = "IPAddress"; DropDownList1.DataValueField = "IPAddress"; DropDownList1.DataSource = ds; DropDownList1.DataBind(); con.Close(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)