By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,390 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Interpreting ASP within templates using Microsoft Scripting Control

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <us*****@almostobsolete.net> wrote in message
news:OW**************@TK2MSFTNGP09.phx.gbl...
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

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.