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
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