private void DDlist()
{SqlConnection con = new SqlConnection(conString);SqlCommand cmd = new SqlCommand("Select * from kategoriTablosu", con);SqlDataAdapter da = new SqlDataAdapter(cmd);DataSet ds = new DataSet();da.Fill(ds);DropDownList1.DataTextField = ds.Tables[0].Columns["kategoriadi"].ToString();DropDownList1.DataSource = ds.Tables[0];DropDownList1.DataBind();}
Hiç yorum yok:
Yorum Gönder