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
243.1k
checkbox checked inside data list c#
Sep 1 2016 1:28 AM
i have a form in which i will bind out off stock product in data list
and inside data list have check box
i want when which item checked then it convert into out of stock to available product
this is work properly but when first item checked then it convert into out of stock to available product but facing error like:
Collection was modified; enumeration operation may not execute.
and my code is like: on check box checkedchande
foreach
(
DataListItem
item
in
divProducts.Items)
{
Label
ProductId = (
Label
)item.FindControl(
"label_product"
);
CheckBox
chkbox = (
CheckBox
)item.FindControl(
"chkbox"
);
if
(chkbox.Checked)
{
objAdmin.OperationName =
"update_avail"
;
objAdmin.ProductId =
Convert
.ToInt16(ProductId.Text);
objAdmin.Pro_avail =
"Available";
objAdmin.Quantity = 30;
DataSet
ds = objAdmin.selectoutofstock();
BindGrid();
}
}
Reply
Answers (
2
)
how to show and hide multiple divs using next and pre btn ?
Link button and gridview button not firing onclick and clik