Display HTML in database results

You can store HTML code in fields in your database and display it as formatted HTML text on a page. 

Example

The database field value <B>bold words</B> will appear in a database results region (on a web page in your server-based web site) as bold words.

To create and format a database results region to display HTML, do the following:

  1. Right-click the Database Results region, and then click Database Results Properties. The Database Results Wizard starts.
  2. Select Use an existing database connection, and then select the relevant connection from the list.
  3. Click Next, and then select Record Source
  4. In the Record Source list, choose the table containing the HTML values you want to display.

  5. Click Next until you get to the end of the wizard, and then click Finish.
  6. Right-click the column value corresponding to the database column containing HTML. It will look something like this: <<HTML>>.
  7. Click Database Column Value Properties, and then select the Column value contains HTML check box.
  8. Click OK

    When the page is viewed via HTTP in a web browser, the HTML code will display as formatted HTML text on the page.

Important   Enabling site visitors to add HTML to a database column may pose a security risk to your Web site. Please see Microsoft TechNet for more information on Web site security.

Note   The hyperlink in this topic goes to the Web. You can switch back to Help at any time.