Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I have an ASP page. It has n

Status
Not open for further replies.

DKL01

Programmer
Sep 14, 2000
233
US
Hi,

I have an ASP page. It has nothing but four hyperlinks. Reason by making this page
an ASP instead of HTML is one of the URL for hyperlinks is derived dynamic.

<%

\\Database connection code

SQL = &quot;select filename from table1&quot;
RS.open, SQL, objConnection
data = RS(0)

URL = &quot; & data & &quot;.html&quot;

%>

<HTML>
<BODY>

-- code for link1, link2, link3 ---

<a href=&quot;<%=URL%>&quot;> <img src=&quot;logo.gif&quot; border=&quot;0&quot;></a>

</BODY>
</HTML>

Per requirements this page should be HTML page.
Is there any way we can have a vbscript code in separate include file of type ASP
and make the original page as HTML.

THANKS
 
You need to put all your database code in one asp page.
When this page is called, it will connect to the database and retreive the recordset. On the last line, response.direct or if you're on IIS 5 server.transfer to your html page with a querystring of the URL, eg.
response.redirect &quot;MyHTML.asp?&quot; & rs(&quot;MyURL&quot;).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top