Now, I do not favor this technique very much. It has its pros and cons and the biggest con is that it will only work on Internet Explorer 4 and above. Netscape will not support this technique. However, I would still urge you to master this technique. You might encounter some cases where you want to use this technique (as in a controlled environment, like an intranet, where you have control over the browser being used). Not only that, understanding this technique will be key to mastering the next technique that is coming down the technology pipeline?XML Data Islands. That technology is something you will use in the near future to enhance your data-driven Web pages.
Mastering the Tabular Data Control is also the easiest way to learn about another useful IE-specific feature?Remote Data Services. While the Tabular Data Control is useful for displaying static data (usually present in flat-delimited text files), Remote Data Services allows you to access live data from a database.
Master the Tabular Data Control
If you use an ActiveX control in your Web pages, you need to provide information about the control as well as indicate where the user can download the control. The user is usually prompted with a dialog box before the ActiveX control is downloaded. Then the control needs to be installed before the Web page can use it. This entire process makes using ActiveX controls on Web pages less appealing. However, what if you could use ActiveX controls that are built into the browser itself? Then the user doesn’t have to download anything; your Web page simply starts using the control.
When you install Internet Explorer on your machine, it silently installs a number of different ActiveX controls. These controls are lightweight and don’t really cause any problems, so it’s not like buying and installing a third-party grid control. Think of it as similar to the common controls that ship with Windows?the treeview control, the listview control, and so forth that are used by Windows Explorer.
The Tabular Data Control is one of these controls. The Tabular Data Control acts as an invisible container holding a set of records on your Web page that you can manipulate within your code. If you have programmed with Visual Basic, the Tabular Data Control is similar to the Visual Basic Data Control, except it is not visible. Like the Visual Basic Data Control, you can manipulate it using your code?you can move from record to record and access its data. Unlike the VB Data Control, the only kind of data that the Tabular Data Control can display is a delimited-text flat file on your Web server (usually a comma-separated values file).
Suppose you had a list of data that you wanted to display on your Web page?for example, a list of customer information. You could display the list as rows and columns using the HTML
|pair. If you had a hundred rows in the list, you would need to code a hundred row tags for your HTML table.
|for each column. Within thesection, you code a single row using a single
|tag pair. Within the cell (the TD), you use the HTML container tag