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
Hanan Masood
NA
2
2.1k
Adding items to comboBox at runtime C# windows application
Jul 10 2014 7:19 AM
I am reading values from database and assigning these values to combo but it didn't assign
try
{
objCls.objSqlCmd = new SqlCommand();
objCls.objSqlCmd.CommandType = CommandType.Text;
objCls.objSqlCmd.CommandText = "SELECT * FROM attributeValue WHERE attributeCode='" + attributeCode + "'";
objCls.objSqlCmd.Connection = clsObjects.objSqlCon;
clsObjects.objSqlDr = objCls.objSqlCmd.ExecuteReader();
while (clsObjects.objSqlDr.Read())
{
cmbDropDown.Items.Add(clsObjects.objSqlDr["v1"].ToString());
cmbDropDown.Items.Add(clsObjects.objSqlDr["v2"].ToString());
cmbDropDown.Items.Add(clsObjects.objSqlDr["v3"].ToString());
}
clsObjects.objSqlDr.Close();
}
catch (Exception ex)
{
clsFunction.CathExeption(ex);
}
Reply
Answers (
1
)
How to clear or update mvc bundle cache?
Show me the last record after saving and on time....