ASP Page Layout in Table Issue

Discussion in 'ASP General' started by msnnews,microsoft.com, Oct 2, 2009.

  1. 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
     
    msnnews,microsoft.com, Oct 2, 2009
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.