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
narasiman rao
NA
519
772.2k
in combo box data is not retrieved from the DB in WEB Applic
Aug 13 2015 7:25 AM
my code as follows
SqlConnection conn = new SqlConnection("Data Source=DOCTOR\SQLEXPRESS;Initial Catalog=HIMT_Testing;User ID=sa;Password=himt123");
conn.Open();
SqlCommand sc = new SqlCommand("select Designation from Designations where active <>'d'", conn);
SqlDataReader reader;
reader = sc.ExecuteReader();
DataTable dt = new DataTable();
dt.Columns.Add("Designation", typeof(string));
dt.Load(reader);
ComboBox1.DataTextField = "Designation";
ComboBox1.DataValueField = "Designation";
ComboBox1.DataSource = dt;
conn.Close();
in combo box data is not retrieved from the database.
what is the problem in my code. it is web application.
Reply
Answers (
1
)
How to export all repeater data in excel file
iam implementing linq to sql using stored procedure