TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
waffle
NA
48
0
populate 2nd combobox based on the 1st combobox
Apr 3 2007 3:17 AM
i want to update my second combo box based on the choice on the first combobox. what is the simplest way to do this? i had my first combobox works. ok.. so far, this is my code for the 1st combobox using (SqlConnection conn = new SqlConnection(Properties.Settings.Default.dbConnectionString)) { SqlDataAdapter da = new SqlDataAdapter("SELECT [CategoryName] FROM Categories",conn); DataSet ds = new DataSet(); daCat.Fill(ds,"Categories"); comboBox1.DataSource = ds.Tables["Categories"]; comboBox1.DisplayMember = "CategoryName"; } i don't know how the code for second combobox will start. but the sql will say something like this.. select productname from products where categoryID=combobox1.text
Reply
Answers (
9
)
Connection Pool Problem
Connecting a web service to upload into a database. Is this possible?