DropDownList problem

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top