| c# Programming Glossary: subjectidASP.NET: Right way to populate a Dropdown list from database http://stackoverflow.com/questions/7227510/asp-net-right-way-to-populate-a-dropdown-list-from-database  ddlSubjects.Items.Clear string selectSQL SELECT SubjectID SubjectName FROM Students.dbo.Subjects SqlConnection con new.. reader SubjectName .ToString  newItem.Value reader SubjectID .ToString  ddlSubjects.Items.Add newItem  reader.Close catch.. SubjectNamne ddlSubject.DataValueField SubjectID ddlSubject.DataBind EDIT More complete example private void.. 
 |