I have a table in database named user. The columns are id, name, phone and address. I put a textbox as a search box so when the user search using the search box, it will display list of users related. I want to retrieve the list of data in a HTML table because I want to add an edit button for each line retrieved. I tried this code but it has a problem with ForEach function. When I separate as ForEach, it says For must end with Next.
<TABLE style="Z-INDEX: 113; POSITION: absolute; TOP: 368px; LEFT: 592px" id="Table1" border="1" cellSpacing="1" cellPadding="1" width="300">
<% for each(DataRow row in ds.Tables[0].Rows) { %>
<TR>
<td><%= row["columnName"] %></td>
</TR><% } %>
</TABLE>
I already retrieved my data into SQLDataAdapter with this code:
Dim Adpt As New SqlDataAdapter(cm.CommandText, cnConnect)
Dim ds As New DataSet

GridView.