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

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    734
    clintonG
    Dec 24, 2004
  2. Guybrush Threepwood

    Table-based layout to CSS layout

    Guybrush Threepwood, Jun 6, 2006, in forum: HTML
    Replies:
    20
    Views:
    1,013
  3. Replies:
    1
    Views:
    585
    John Timney \(MVP\)
    Jun 19, 2006
  4. Habib

    Css-Layout vs Table-Layout

    Habib, Jun 19, 2006, in forum: HTML
    Replies:
    15
    Views:
    1,018
    Wÿrm
    Jun 20, 2006
  5. sso
    Replies:
    6
    Views:
    595
    Roedy Green
    Apr 30, 2009
Loading...

Share This Page