markjoe Posted October 6, 2008 Share Posted October 6, 2008 I have a PHP script that build 3 arrays from SQL queries. A table is built with the header built from 1 array, the rows labeled with the second array and the table filled in with a binary value show weather the combination exists. This may explain it better: echo "<tr>"; foreach($A1 as $x1){ echo "<th>$x1</th>"; } echo "</tr>"; foreach($A2 as $x2){ echo "<tr>"; echo "<td>$x2</td>"; if(in_array($x1.$x2, $A3)){ echo "<td>X</td>"; }else{ echo "<td> </td>; } echo "</tr>"; } Basically, its graphing out what services are available in what areas. The Problem: I am trying to re-create this in ASP.NET 3.5. I keep seeing people poo-pooing Response.Write. Is there a good way to build the table manually like this, or is there a "control" that would apply to this? Link to comment https://forums.phpfreaks.com/topic/127312-solved-aspnet-35-building-tables-manually-or-3-data-sources-for-1-table/ Share on other sites More sharing options...
markjoe Posted October 9, 2008 Author Share Posted October 9, 2008 Not very active board I guess. I got it figured out. sqlDataSource returns a DataView. DataView.Tables() returns a DataTable, which you can iterate with For Each ... Next accessing DataTable.rows and DataTable.columns. I used Response.Write() not finding any other option or even any reason not to. Link to comment https://forums.phpfreaks.com/topic/127312-solved-aspnet-35-building-tables-manually-or-3-data-sources-for-1-table/#findComment-661072 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.