• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. All Fueled Up: The Best of Se... > Getting It Right from the Data Sourc...

Getting It Right from the Data Source

Creating data-driven pages is like coming down a ladder—miss that first step and you’re in for an unwelcome surprise. A data-driven page really starts with the proper formulation of the data itself. Let’s look at three areas often misunderstood by web application newbies who are dealing with text, links, and images. First, text is far more flexible in databases than is commonly assumed. For example, a memo field in Access (used when the data runs longer than 255 characters) also can hold HTML tags; so you could store—and retrieve—multiple paragraphs with full formatting. When working with data that will be included as links, you might be tempted to set the data field to a hyperlink type. Hyperlink-styled data looks real pretty in Access but is completely useless in Dreamweaver; store your linking data as straight text instead. With images, it’s best just to save just the filename and not the path to the image. If you want to include dynamic images located in a separate folder, choose Insert > Image, and then choose the Select File Name from Data Source option. Select the proper field and, in the URL field, prepend the desired path (in human words, add the path before the code). For example, an ASP final URL might resemble this code:

images/thumbs/<%=(employees.Fields.Item("images").Value)%>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint