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
Sam thota
NA
2
496
how to bind drop down lists in c#?
Jan 28 2019 1:56 AM
private void comboBoxComNS_SelectedIndexChanged(object sender, EventArgs e)//country
{
ModelBind();
string str = Convert.ToString(comboBoxComNS.SelectedValue);
SqlCommand cmd = new SqlCommand("Select MODELNUM from TBL_MODEL where COMPID=@compid", conn);
cmd.Parameters.AddWithValue("@compid", str);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "Modelnew");
comboBoxMNS.DataSource = ds.Tables["Modelnew"];
}
Reply
Answers (
3
)
comma separator function
Handling server exceptions with Breeze SaveChanges () Method