Code :
SqlConnection vcomm = new SqlConnection(connectionstring);
vcomm.Open();
SqlDataAdapter vadap = new SqlDataAdapter("Select DISTINCT Type from Menu", vcomm);
vadap.Fill(tbly);
DropDownList1.DataSource = tbly;
DropDownList1.DataTextField = "Type";
DropDownList1.DataValueField = "Type";
DropDownList1.DataBind();
vcomm.Close();
Done :)
SqlConnection vcomm = new SqlConnection(connectionstring);
vcomm.Open();
SqlDataAdapter vadap = new SqlDataAdapter("Select DISTINCT Type from Menu", vcomm);
vadap.Fill(tbly);
DropDownList1.DataSource = tbly;
DropDownList1.DataTextField = "Type";
DropDownList1.DataValueField = "Type";
DropDownList1.DataBind();
vcomm.Close();
Done :)
Comments
Post a Comment