By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,452 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

DataList checkbox status

P: n/a
I want to get the status of the checkbox control in the
item template of the DataList in the code behind

Using findcontrol i am not able to get the status of the
checkbox . How shouls i get the status of the checkbox
whether it is checked or not?\

Thank you
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Vannela,
This piece of code should do (the key is to iterate the Items collection!).

foreach ( DataListItem item in ItemsList.Items )
{
CheckBox chk = (CheckBox) item.FindControl("CheckBox1");
bool checkedValue = chk.Checked;
}

Regards
Claudio

"Vannela" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
I want to get the status of the checkbox control in the
item template of the DataList in the code behind

Using findcontrol i am not able to get the status of the
checkbox . How shouls i get the status of the checkbox
whether it is checked or not?\

Thank you

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.