I ve a simple form in C# with Customer details. I used comboBox for CustomerID. How can I select CustomerID from SQL database? and I want once I select customerID in comboBox rest of the text boxes like customer name, phone fills automatically. How can I achieve this?
Loading
Niradhip ChakrabortyPosted Jul 2, 2008, 5:21 PM
For selecting CustomerID you can use the following sql statement.
"select CustomerID from tablename"
Now you want to fill all the other textboxes on change of combobox selected item.
To do this you can use combobox SelectedIndexChanged events. Make the autopostback
property true for the combobox.
Glance through the following articles to know more about combobox features:
http://www.codersource.net/asp_net_dropdownlist.html
http://www.aspfree.com/c/a/ASP.NET/ASPNET-Dropdown-List-Control-Eight-Ways-to-Bind-Data/
JamesPosted Jul 2, 2008, 9:19 AM