ASP Page Layout in Table Issue

  • Thread starter msnnews,microsoft.com
  • Start date
M

msnnews,microsoft.com

Hi all,

I have stored the contents of the page between <body> and </body> in a table
field for CMS reasons. Unfortunately in the stored code is some dynamic
recordset contents and this will not display due to <%= %> tags, I have
tried the replace function and although that partly works is there another
option?

Thanks in advance, see code below.

CURRENTLY USING

<%
Dim BodyTemplate
BodyTemplate = rsViewAboutUs.Fields.Item("BodyTemplate").Value
BodyTemplate = Replace(BodyTemplate,
"{(rsViewAboutUs.Fields.Item(""HeadImageURL"").Value)}",
rsViewAboutUs.Fields.Item("HeadImageURL").Value)
BodyTemplate = Replace(BodyTemplate,
"{(rsViewAboutUs.Fields.Item(""HeadImageAlt"").Value)}",
rsViewAboutUs.Fields.Item("HeadImageAlt").Value)
Response.Write(BodyTemplate)
%>

PROBLEM CODE WHERE ABOCE DOESNT WORK

<td align="center"><a href="<%= WebRoot %>/index.asp"
class="TopLinks">Home</a></td>
<td align="center" ><img src="<%= WebRoot
%>/html/images/top_links_sp.gif" width="3" height="31" /></td>
<% If Abs(rsViewWebPages.Fields.Item("Fleet").Value) =1 Then %>
<td align="center"><a href="<%= WebRoot %>/html/fleet.asp"
class="TopLinks">Fleet</a></td>
<td align="center"><img src="<%= WebRoot
%>/html/images/top_links_sp.gif" width="3" height="31" /></td>
<% End If %>

Its the IF statements I cannot get to work.

Regards
Simon Gare
www.london.chauffeurcarcompany.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top