The table doesn t look like much with just (Web host)
The table doesn t look like much with just the text in it. However, keep in mind that a table is always just raw data and how things look in the table doesn t dictate how they ll look on a page. As you ll discover in Chapter 12, you can use a DataList control with the Photos table to show the actual pictures and captions on a page. For now it s sufficient to just close and save the table. Creating a Table of HyperLinks If your site has many links to Web sites outside your own site, you can store all those links in a database table. Doing so keeps all the links in one place, where they re easy to manage. You can then use whatever links you want on any page you want without having to worry about keeping links up-to-date across many different pages within your site. For a table of links, you ll need at least two text fields, one for the name or title of the site, and one for the site s URL (address). If you like, you could add a third field for storing a description of each site. Also, if you want to be able to edit the table s data through Web pages, the table will need a primary key. To keep things fairly simple, I ll show you how to create a table that contains a primary key, a field for storing each site s name, and a field for storing each site s address. The steps are: 1. If you re in Solution Explorer, click the Database Explorer tab. 2. Right-click on Tables under the database name and choose Add New Table. 3. Type SiteId as the first field name, and set its Data Type to smallint. If you think you ll have more than 32,000 links, use the int data type rather than smallint. Figure 11-36: Some sample records in my Photos table. Chapter 11: SQL Server Crash Course 257
From our experience, we can recommend PHP Web Hosting services, if you need affordable webhost to host and run your web application.