V
Viktor Popov
Hi,
I use a DropDownList for presenting information from DataBase. Here it is
the code:
private void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack)
{
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=@@@; Password=@@@@@");
SqlDataAdapter dad1 = new SqlDataAdapter ("SELECT o.OfferID,o.TypeOffer FROM
blek.TypeOffer o ORDER BY o.TypeOffer", conn);
DataSet ds =new DataSet();
conn.Open();
dad1.SelectCommand.ExecuteNonQuery();
dad1.Fill(ds,"Offers");
DDL1.DataSource=ds.Tables[0];
DDL1.DataValueField = "OfferID";
DDL1.DataTextField = "TypeOffer";
DDL1.DataBind();
conn.Close();
}
}
The problem is that when I like to Search by letter in the DropDownList
DDL1 it doesn't work. How could be enabled this feature?
Thank you!
Viktor
I use a DropDownList for presenting information from DataBase. Here it is
the code:
private void Page_Load(object sender, System.EventArgs e)
{
if(!Page.IsPostBack)
{
SqlConnection conn = new SqlConnection("Data Source=BLEK;Initial
Catalog=Estate; User ID=@@@; Password=@@@@@");
SqlDataAdapter dad1 = new SqlDataAdapter ("SELECT o.OfferID,o.TypeOffer FROM
blek.TypeOffer o ORDER BY o.TypeOffer", conn);
DataSet ds =new DataSet();
conn.Open();
dad1.SelectCommand.ExecuteNonQuery();
dad1.Fill(ds,"Offers");
DDL1.DataSource=ds.Tables[0];
DDL1.DataValueField = "OfferID";
DDL1.DataTextField = "TypeOffer";
DDL1.DataBind();
conn.Close();
}
}
The problem is that when I like to Search by letter in the DropDownList
DDL1 it doesn't work. How could be enabled this feature?
Thank you!
Viktor