0

I worked on an online web template that has a lot of design classes.

I converted this web template to an ASPX file and all is good. I then created some SQLdatasource to read data from a database (using a stored procedure).

after getting the data I need to generate an HTML table with the column name as the <th> and the data as <td>.

how can I loop through the data returned from the SQLdatasource while reading both its header and its corresponding data in VB.NET?

the trick is that the amount of data returned from the stored procedure might be changed later so I cannot use datarow("colomn name").ToString(), because the column names are not fixed.

using a gridView messed up the web page design even after hiding it inside a panel.

2
  • Perhaps you could modify the stored procedure to return the column names as the first row. Does the first row have to be filled with <th> elements instead of <td>? You say you are not using a GridView, but you don't say what you are using. Commented Jan 29, 2020 at 13:20
  • I am using the data source to return the data, then looping on the data to add the <th> , <tr> and <td> tags and the data using DataRowView class Commented Jan 31, 2020 at 6:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.