Using a DataList Control to Repeat Composite Controls

Early access to new technology is a nice benefit of writing computer books. Using .NET for several years now and having written well over 100,000 lines of production code, I have come to appreciate the simplicity and utility of controls like DataList. The DataList control is easy and powerful to use. However, if you are using it (or the DataGrid control) just to display data sets or simple arrays of data, you are missing out on a subtle power that is also readily available. I mentioned it earlier in the chapter. If you create composite controls from a user control, you can also use these composite controls as elements of a DataList, Repeater, or DataGrid control. That is, you can repeat complex ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.