Microsoft KB Archive/187823

= FP98: How to Return Plain Text as a URL from a Database =

Article ID: 187823

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft FrontPage 98 Standard Edition

-



This article was previously published under Q187823



SUMMARY
This article explains how to return plain text as a hyperlink by modifying the Database Region Wizard code that is generated by Microsoft FrontPage. For example, if you have a database that contains e-mail addresses that are stored in the format of 'example@microsoft.com,' you can return that data as a live hyperlink by using the FrontPage Database Region Wizard.



MORE INFORMATION
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.  In FrontPage Explorer, right-click the .asp file that contains the query that returns the results of a search and click Open With. In the Open With Editor dialog box, click Text Editor (Notepad.exe). In the code for the .asp page, find the line that writes the text for the field that you want to return as a Uniform Resource Locator (URL).

Example 1
If you want to return a field titled "email" the code would be similar to the following: If Not IsEmpty(fp_rs) And Not (fp_rs Is Nothing) Then Response.Write CStr(fp_rs("email"))

Example 2
If you want to return a field titled "links" the code would be similar to the following: If Not IsEmpty(fp_rs) And Not (fp_rs Is Nothing) Then Response.Write CStr(fp_rs("links"))

 Modify the code so that the Response.Write procedure adds the HTML code for a hyperlink:

Example 1:
To return the "email" field as a mailto hyperlink, change the code to the following: If Not IsEmpty(fp_rs) And Not (fp_rs Is Nothing) Then Response.Write "" & CStr(fp_rs("email")) & ""

Example 2:
To return the "links" field as an HTTP hyperlink, change the code to the following: If Not IsEmpty(fp_rs) And Not (fp_rs Is Nothing) Then Response.Write "" & CStr(fp_rs("links")) & ""

</ol>

Note: The method described in this article is not neccessary for FrontPage 2000.

Additional query words: 98

Keywords: kbhowto KB187823

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.