Interpreting ASP within templates using Microsoft Scripting Control

Discussion in 'ASP General' started by Thomas Parslow, Dec 16, 2003.

  1. Hi,

    I'm using an ASPTemplate class (the one from asptemplate.sourceforge.net) to
    produce WAP and HTML verions of the same pages. It seemed to me that it
    would be very usefull to have the template files (which are essentially just
    HTML with special tags to indicate where values should be inserted) be able
    to contain small amounts of ASP code.

    So what I'm doing is allowing normal ASP code blocks (script delimited by <%
    and %>) withing my templates, then when I display the templates I strip out
    the code blocks and run them using the microsoft scripting control (passing
    in the server, response and request objects).

    This seems to work ok but I was just wondering does anyone see any problems
    that this might cause?

    Thanks :)

    -Tom
    PS: This is ASP, not ASP.NET
    PPS: The code is very simple, if anyone wants to see it just ask
     
    Thomas Parslow, Dec 16, 2003
    #1
    1. Advertisements

  2. I am not familiar with ASP template, but the architecture idea is sound. The
    only potential issue I can see, at a glance, is not being able to easily
    debug if there is an error. If you have that conquered, you are fine.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    **********************************************************************
    Think Outside the Box!
    **********************************************************************
     
    Cowboy \(Gregory A. Beamer\), Dec 17, 2003
    #2
    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.