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
Maneesh A N
NA
179
108.5k
Return checkboxlist
Oct 6 2014 12:18 AM
HI
I am facing problem in finding the checked items in checkbox list. Actually the list items for the checkbox list are loaded from database. But by using the code below i am not able to find the checked item in the list and the items are always returning false. Below is my code Can someone please help me with this?
Please be correct.i need to get return items which is checked in check box list from in c#
Class1.connect();
SqlDataAdapter sda4 = new SqlDataAdapter("prcchklisttestupdate", Class1.con);
sda4.SelectCommand.CommandType = CommandType.StoredProcedure;
sda4.SelectCommand.Parameters.AddWithValue("@ibookingid", SqlDbType.Int).Value = label6.Text;
DataTable dt4 = new DataTable();
sda4.Fill(dt4);
for (int i2 = 0; i2 < dt4.Rows.Count; i2++)
{
foreach (string item in chkList1.Items)
{
if (item == dt4.Rows[i2][0].ToString())
{
chkList1.SelectedValue = true;
}
}
}
Reply
Answers (
1
)
How to develop MCQ quiz application using xaml and c#
run a software