I ported the page from classic ASP to ASP.net. Part of what happens on this page is that a collection of custom types is created and then displayed through commands Response.Write(). I would like the business logic to be separated from the code behind the file (and possibly move all this to a user control), but I cannot understand how I actually display the collection after it is created. Here I also want to specify the main page, so the code cannot remain inline. Here's a very stripped down version of the current code:
<%
Dim objs as ArrayList = New ArrayList()
For i = 0 To 2
Dim obj as Obj = New Obj()
obj.setProp1("ASDF")
obj.setProp2("FDSA")
objs.Add(obj)
Next i
%>
<table>
<thead>
<tr>
<th scope="col">Property 1</th>
<th scope="col">Property 2</th>
</tr>
</thead>
<tbody>
<%
For Each obj As Obj In objs
Dim objProp1 As String = obj.getProp1
Dim objProp2 As String = obj.getProp2
%>
<tr>
<td><% Response.Write(objProp1)%></td>
<td><% Response.Write(objProp2)%></td>
</tr>
<%
Next
%>
</tbody>
</table>
What is the ".net" method?