There may be something fundamentally wrong with the way I'm thinking.

I have a dataset, with a couple columns, and a few rows. Now, if I wanted to make an editable form for this (one textbox for each column in each row, thus creating a lot of textboxes), how would I go about doing this?

From the current mindset I have, which is very ASP 3.0 based, I'd so something like this:

VB Code:
  1. 'Code behind:
  2.  Response.Write("<table border=1><tr>")
  3.  
  4.         For intColCount = 0 To ds.Tables(0).Columns.Count - 1
  5.  
  6.             Response.Write("<td><b>" & ds.Tables(0).Columns(intColCount).ToString & "</b></td>")
  7.  
  8.         Next
  9.  
  10.         Response.Write("</tr>")
  11.  
  12.  
  13.  
  14.         For intCount = 0 To ds.Tables(0).Rows.Count - 1
  15.             Response.Write("<tr>")
  16.             For intCount2 = 0 To ds.Tables(0).Columns.Count - 1
  17.                 Response.Write("<td>" & ds.Tables(0).Rows(intCount).Item(intCount2).ToString & "</td>")
  18.             Next
  19.             Response.Write("</tr>")
  20.         Next
  21.  
  22.         Response.Write("</table>")

You can see what I'm doing here, and for editable textboxes, I'd just replace the appropriate <td>s, etc, etc, etc.

But a few questions arise:

1) Is this the right way at all?
2) What if I wished to have the output of this above code in the middle of some page where other elements already exist? Would I place this code inline to the ASPX page contents, or is that wrong?

Enlighten me.