This code renders a list of .NET components and their categories. Up to three columns can be displayed (two shown here).
For years, developers have wanted to format listboxes with columns, just like Access. Now you can.
(note that this example will show as a regular <select> element to non-IE users; more support for Mozilla browsers will
be available in the future)
<ELB:EasyListBox id="myListBox" runat="server"
Width="250px" Height="300px"
DataValueField="ComponentID"
DataTextField="ComponentName"
DataTextField2="CategoryName"
ConnectionStringSqlServer="connectionstring"
SelectQuery=" SELECT TOP 50 a.ComponentName, c.CategoryName, a.ComponentID FROM tblComponents a, tblCategories c WHERE a.CategoryID = c.CategoryID ORDER BY c.CategoryName, ComponentName "
/>
|