Using a DataList to show HyperLinks In the (Web hosting reseller)
Using a DataList to show HyperLinks In the photos example, I used a HyperLink control in a DataList ItemTemplate to show hyperlink text from a table (the PhotoCaption field), and to define where the link takes the user (the PhotoURL field). You can use the same technique to show a list of links that are stored in a Database table. In Chapter 11, I created a sample table named Links that contains two text fields named SiteName (the name of a Web site) and SiteURL (the URL of the site). It s a small sample table, as shown in Figure 12-57. But of course the technique described here would work with any number of records in a table. A DataList control containing a standard HyperLink control that s bound to the SiteName and SiteURL fields in the table will present a nice list of links. Here are the steps to create the list: 1. From the Data group in the Toolbox, drag a Data List control to any .aspx page or content placeholder. 2. From the DataList control s Common Tasks menu, select Choose Data Source.
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.