Click here to Skip to main content
15,168,971 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how can i read data from data base as a drop down list using combobox?
hi every body how are you need a help from u
1. how can i fetch data in my combo box alphabetically? I'm using c#2008 and sq l server 2005
there are data in my kk data base with a table name gg having column name
user_name and user_id
user_id has data:
and soon i need this data to be displayed in my combo box liken this
when start to type 'A' in my combo box it must fetch data beginning with 'a' like this

2. please help me by showing how to connect data base dynamically using c# classes with sq l database. any good and free reference is highly required
thank u for u'r help
please show me all the necessary steps for the question
Reply With Quote

Part 1
Beginners guide to accessing SQL Server through C#[^]

Part 2

DropDownList.DataSource = the data table
DropDownList.DataValueField = the field you want
1. You do not need a ComboBox for this. All you need is a TextBox with AutoComplete property set. Look into MSDN to understand how it can be done.

2. How about MSDN?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900