Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 16, 2012 12:34 AM by 86mahendra
Member
26 Points
6 Posts
Feb 15, 2012 09:25 PM|LINK
Hi ,
I want to generate a table in following fasthion :
<table><tbody> <tr class="folder" style="-moz-user-select: none;"> <td><div><img src="folder.png"><span>home</span></div></td> <td class="bytes">Folder</td> </tr> <tr class="folder hover" style="-moz-user-select: none;"><td><div><img src="folder.png"><span>share</span></div></td> <td class="bytes">Folder</td> </tr></tbody></table>
I want to add the rows from the CS code depending on the number of entries.
Cant I use something similar to innerHtml to add div and span to td?
Participant
775 Points
174 Posts
Feb 15, 2012 11:46 PM|LINK
I am doing something similar using the HTMLTextwriter. Honestly im not sure if there is abetter way.
heres a link that got me started
http://www.dotnetperls.com/htmltextwriter
Feb 16, 2012 12:34 AM|LINK
Alternative soln :
use .Text attribute of the cell . u can assign any html code to in string format it works!!
86mahendra
Member
26 Points
6 Posts
Add <div> to <td> dynamically.
Feb 15, 2012 09:25 PM|LINK
Hi ,
I want to generate a table in following fasthion :
<table><tbody>
<tr class="folder" style="-moz-user-select: none;">
<td><div><img src="folder.png"><span>home</span></div></td>
<td class="bytes">Folder</td>
</tr>
<tr class="folder hover" style="-moz-user-select: none;"><td><div><img src="folder.png"><span>share</span></div></td>
<td class="bytes">Folder</td>
</tr></tbody></table>
I want to add the rows from the CS code depending on the number of entries.
Cant I use something similar to innerHtml to add div and span to td?
rickjames961
Participant
775 Points
174 Posts
Re: Add <div> to <td> dynamically.
Feb 15, 2012 11:46 PM|LINK
I am doing something similar using the HTMLTextwriter. Honestly im not sure if there is abetter way.
heres a link that got me started
http://www.dotnetperls.com/htmltextwriter
Friedrich Nietzsche
86mahendra
Member
26 Points
6 Posts
Re: Add <div> to <td> dynamically.
Feb 16, 2012 12:34 AM|LINK
Alternative soln :
use .Text attribute of the cell . u can assign any html code to in string format it works!!