En asp.net puedes programar en
Page.aspx
page.aspx.vb o cs (en caso de que utilices c#)
en asp tradicional solo se programa a modo de scripts en html.
en asp.net:
Page.aspx (Programacion inline o en linea algo similar al asp)
Page.aspx.vb (Programacion code behind, que es una de las novedades de asp.net )
Es decir si puedes programar en el html, voy a tratar de poner un ejemplo como podrias hacer lo que quieres.
Código HTML:
<%@import namespace="System.Data"%>
<%@import namespace="System.Data.SqlClient"%>
<%@import namespace="System.Configuration.ConfigurationSettings"%>
<%@ Page Language="vb"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Demo</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="FlowLayout">
<%
Dim sqlQuery As String = "spRooms_GetAvailability"
Dim sqlConn As New SqlConnection(AppSettings("ConnectionString"))
Dim sqlComm As New SqlCommand(sqlQuery, sqlConn)
sqlComm.CommandType = CommandType.StoredProcedure
Dim sqlAdapter As New SqlDataAdapter(sqlComm)
Dim ds As New DataSet("Availability")
sqlAdapter.Fill(ds)
ds.Tables(0).TableName = "RoomTypes"
ds.Tables(1).TableName = "Plan"
Dim ParentCol As DataColumn = ds.Tables(0).Columns("TypeID")
Dim ChildCol As DataColumn = ds.Tables(1).Columns("TypeID")
Dim relation As New DataRelation("RoomTypes_Plan", ParentCol, ChildCol)
relation.Nested = True
ds.Relations.Add(relation)
%>
<UL>
<%
For Each row As DataRow In ds.Tables("RoomTypes").Rows
Response.Write("<LI>")
Response.Write(row("Name"))
Dim cRows() As DataRow = row.GetChildRows("RoomTypes_Plan")
If cRows.Length > 0 Then
Response.Write("<UL>")
For Each cRow As DataRow In cRows
Response.Write("<LI>")
Response.Write(cRow("Description"))
Response.Write("</LI>")
Next
Response.Write("</UL>")
End If
Response.Write("</LI>")
Next
%>
</UL>
</body>
</HTML>
Espero me entiendas
Saludos.