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
Devendra Kumar
NA
517
244.6k
checkbox checked item add another list box c#
Jul 28 2016 1:13 AM
i will getting the problem when add to checked item another list box
this is add but it add repeat checked item
and this check box inside datalist
and the code write on check box OnCheckedChanged events.
i want checked item add into listbox my code is:
protected
void
OnCheckedChanged
(
object
sender,
EventArgs
e)
{
foreach
(
DataListItem
item
in
divProducts.Items)
{
Label
lbl_pro_nm = (
Label
)item.FindControl(
"lbl_pro_nm"
);
CheckBox
chkbox = (
CheckBox
)item.FindControl(
"chkbox"
);
if
(chkbox.Checked)
{
ListBox1.Items.Add(lbl_pro_nm.Text);
}
else
{
ListBox1.Items.Remove(lbl_pro_nm.Text);
}
}
}
Reply
Answers (
2
)
how to pass integer parameter to query string
Nested foreachloop not working in XSLT