473,379 Members | 1,252 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Interpreting ASP within templates using Microsoft Scripting Control

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
1 1559
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Oscar | last post by:
I am quite new to the ASP scene. I want to display the results of a recordset into a third party grid control called VSFlexgrid. I've prepared one asp page which queries an Access database and...
1
by: Peter Petrillo | last post by:
The Access development group here at this company has exported its reports in xml format from Access 2003. I have no influence on how they have created them. I received the following files xm...
0
by: Robin Tucker | last post by:
Hi people, Is it possible for me to handle events raised by an object which is embeded in a web browser control, from my VB.NET code? I am able to gain access to the object itself through the...
2
by: Rob Meade | last post by:
Hi all, I have a webform containing about 9 web user controls, these primarily are just html in a control thats used as the template etc.. A colleague has given me another control for our...
1
by: Bennett Haselton | last post by:
Are there any samples of how to create a user control that uses templates, like the <ItemTemplate> and <HeaderTemplate> of the Repeater control? I tried searching for user control samples on the...
10
by: MLH | last post by:
I wish to give someone an A97 database they can install on their PC as a runtime application. I want them to click a button on a form (frmDocumentMyPC). I want to document as much useful...
0
by: 47computers | last post by:
Hello. I'm having a bit of difficulty with some DropDownList controls within templates in a DetailsView on my web form. Basically, I have a form where a user is building a "location profile" with...
0
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in...
4
by: =?Utf-8?B?UmljaEI=?= | last post by:
I am trying to create a project using the ASP.NET AJAX accordion control. I would like to dynamically add panes to the control with a form template added when the pane is added. I have tried...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.