OleDbConnection bg;
protected void Page_Load(object sender, EventArgs e)
{
bg = new OleDbConnection("provider=microsoft.jet.oledb.4.0; data source=" + Server.MapPath("~/menu.mdb"));
OleDbDataAdapter adptor = new OleDbDataAdapter("select * from menum", bg);
DataTable tb = new DataTable();
tb.Columns.Add("veriler");
DataRow r = tb.NewRow();
r[0] = "";
tb.Rows.Add(r);
adptor.Fill(tb);
if (!IsPostBack)
{
DropDownList1.DataSource = tb;
DropDownList1.DataTextField = "menu";
DropDownList1.DataValueField = "id";
DropDownList1.DataBind();
DropDownList1.Items[0].Text = "seciniz...";
DropDownList1.Items[0].Value = "";
}
}