asp.net - Property Rows.Count of HtmlTable reduced to 1 -
on asp.net
page have declared htmltable follows.
<table> <tr> <td> <table id="nodestable" runat="server" cellpadding="0" cellspacing="0" rules=none frame=box> </td> </tr> </table>
i fill table follows:
for integer = 0 15 step 1 dim tblrow new htmltablerow tblinnercell = new htmltablecell() dim htmlcb new htmlcontrols.htmlinputcheckbox tblinnercell.style.add("text-align", "center") tblinnercell.controls.add(htmlcb) tblrow.cells.add(tblinnercell) nodestable.rows.add(tblrow) 'debugging here show rowcount increase sa far 15 next
so see 15 checkboxes , html code shows 15 rows. check 1 of checkboxes 'checked' , press button.
the code behind of button
each row htmltablerow in nodestable.rows if(cbool(ctype(row.cells(0).controls(0), htmlinputcheckbox).checked)) .... end if next
but of sudden nodestable.rows.count = 1
why that?
Comments
Post a Comment