   iterate through checkboxes in asp.net
  Hello,You guys helped before and maybe you can help me this time too. (using C#)I have a project with: a datagrid, and the datagrid has some columns with values received from a SQL database. the last column of the datagrid, is made of checkboxes.ok so I have added some rows in SQL and they appeared in the datagrid as they should, together with the corresponding checkbox in the last column. my question is however how can I recognise the checkbox's status?so theres checkboxes added dynamically (for each row inserted from SQL) so I cant target each of them by ID, i need some sort of iteration, like:foreach(Checkbox in whatever...){do..stuff}however the foreach does not work at all. the "whatever" should be the ID of the checkbox? it does not see my control in intellisense or how its called, which means it does not recognise the ID of the checkbox. so I dont know how to target them.They were created from the aspx file like this:<asp:datagrid ... ><columns>...</columns><templatecolumn>  <itemtemplate>    <asp:Checkbox ID="blabla" runat="server" />   </itemtemplate></templatecolumn></asp:datagrid>so when a new column is made from SQL it receives a checkbox too. how do i target them?Thank you in advance.   
  This is off the top of my head and not tested.  I am not a ASP expert so remember that.  But this should work.DataControlFieldCollection collection = dataGrid1.Columns;foreach(CheckBoxField box in collection){   // What ever you need to do.}Hope that get you going in the right direction.  And if it is all wrong, well at least I tried.  :)theTroll   