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

  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!
    **********************************************************************
    "Thomas Parslow" <> wrote in message
    news:OWJ$...
    > 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
    >
    >
    Cowboy \(Gregory A. Beamer\), Dec 17, 2003
    #2
    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. Charles A. Lackman
    Replies:
    1
    Views:
    1,300
    smith
    Dec 8, 2004
  2. SpamProof
    Replies:
    0
    Views:
    524
    SpamProof
    Oct 21, 2003
  3. JKop
    Replies:
    3
    Views:
    441
  4. Tom McCallum

    Templates within templates

    Tom McCallum, Aug 4, 2004, in forum: C++
    Replies:
    2
    Views:
    351
    tom_usenet
    Aug 4, 2004
  5. recover
    Replies:
    2
    Views:
    779
    recover
    Jul 25, 2006
Loading...

Share This Page