Challenge:
How I generate <tbody> tag using Table, TableRow, etc … controls ?
I want to generate table o/p like this:
<table border="1"> <thead> <tr> <th>Month</th> <th>Savings</th> </tr> </thead> <tbody> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$80</td> </tr> </tbody> <tfoot> <tr> <td>Sum</td> <td>$180</td> </tr> </tfoot> </table>
Src : http://www.w3schools.com/TAGS/tag_tbody.asp
I want to create table like this from my code
behind using .net f/w classes.
Solution:
TableRow.TableSection is the solution for it:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.tablerow.tablesection.aspx
for whatever row you create just provide it’s TableSetion property to appropriate section e.g Body,head etc.
Hope this helps
Happy Programming!!