ASP 101 - Active Server Pages 101 flextable.aspx
<%@ Page Language="VB" %>
<%@ Import Namespace = "System.Data" %>
<script language="VB" runat="server">
	Sub Page_Load(sender As Object, e As EventArgs)
		Dim myDataTable As DataTable
		Dim myDataRow   As DataRow
		Dim I           As Integer
		' Make up some sample data to display.  I'm using an in-memory
		' DataTable to keep things fast and because I assume most users
		' will be using script with some sort of database.  This way you
		' should just be able to drop in your own DB code and edit the
		' display section and you should have everything working.
		myDataTable = New DataTable
		myDataTable.Columns.Add("id",          Type.GetType("System.Int32"))
		myDataTable.Columns.Add("title",       Type.GetType("System.String"))
		myDataTable.Columns.Add("description", Type.GetType("System.String"))
		myDataTable.Columns.Add("image",       Type.GetType("System.String"))
		For I = Asc("A") To Asc("Z")
			myDataRow = myDataTable.NewRow()
			myDataRow("id")          = I - 64
			myDataRow("title")       = "The Letter " & Chr(I)
			myDataRow("description") = "This is an image of an upper case " & Chr(I) & "."
			myDataRow("image")       = "images/lb_" & Chr(I) & ".gif"
		Next I
		' Set repeat columns and direction.
		myDataList.RepeatColumns = ddlWidth.SelectedItem.Value
		myDataList.RepeatDirection = RepeatDirection.Horizontal
		' Bind the DataTable to our DataList
		myDataList.DataSource = myDataTable
	End Sub
<title>ASP.NET FlexTable Sample</title>
<form runat="server" EnableViewState="False">
	<asp:DataList id="myDataList" runat="server"
		Border = "3"
			<strong><%# DataBinder.Eval(Container.DataItem, "title") %></strong><br />
			<img src="<%# DataBinder.Eval(Container.DataItem, "image") %>" align="right">
			<%# DataBinder.Eval(Container.DataItem, "description") %>
	<asp:DropDownList id="ddlWidth" runat="server" AutoPostBack="True">
		<asp:ListItem Selected="True">4</asp:ListItem>
<hr />
Click <a href="">here</a>
to read about and download the source code.