473,473 Members | 1,735 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Attempting to write create an ASP page FROM an ASP page.

I'm trying to write an asp page line by line, as one would create a
text file, only my file will end in .asp.

One line simply writes a close ASP code tag, or
FILECONTENTS=FILECONTENTS & "%>"
When this line processed, an error occurs saying that the string was
never terminated because the asp page attempting to write this line of
code to a NEW asp page reads that close ASP tag (%>), as an actual
close asp tag for itself, instead of a STRING value.

How do I write this %> symbol to a new asp file, while still
maintaining its purpose to close a group of asp code in the newly
created page?
Jul 19 '05 #1
6 1412
Assuming your asp pages are in vbscript, try:

FILECONTENTS = FILECONTENTS & Chr(037) & Chr(062)

This will insert the characters for the codes (037 = % and 062 = >)

Also, it seems unusual to need to generate an asp page on the fly - step
back and confirm that this is indeed the best solution to your problem.

Cheers,
Nicolas

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #2


----- Nicolas wrote: -----

Also, it seems unusual to need to generate an asp page on the fly - step
back and confirm that this is indeed the best solution to your problem.

I was thinking same thing. Out of interest, what are trying to do if you dont mind me asking?

Colin
Jul 19 '05 #3
Bob Barrows suggested a fix. "%" & ">"...separate the %> symbol into
separate characters.

I'm writing invoices for orders, where every product in the order is
written as html, while the shipping price and tracking number will be
dynamic, generated from a database, so that i can remove all recordsets
for the orders by putting them into html in an asp page, while still
allowing myself to edit the shipping and tracking #'s displayed on each
page through a db.

Make sense? suggestions?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4
Jason Daly wrote:
Bob Barrows suggested a fix. "%" & ">"...separate the %> symbol into
separate characters.


Jason, in the future, pleas do not multipost. It is very hard to carry on a
conversation involving two threads in two separate groups.

I'm not sure why you thought .asp.db was a relevant group anyways: your
question had nothing to do with databases. Yes, I know your application is
pulling data from a database, but note that the answer to your question did
not mention a single database-related function.

The best policy is to post your question to a single group. You did not
increase your chances of getting an answer by posting your question both
here and in .db. Instead, you annoyed people who wasted time answering your
question here only to find that it was already answered in the other group.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #5
"Colin Steadman" wrote:

Also, it seems unusual to need to generate an asp page on
the fly...


I agree, though I have done it myself.

Our intranet layout includes a set of dropdown menus, the content of which
resides in a static include file. When that include is updated, we generate
our site map and failover pages** (all ASP documents) in part by parsing
this include.

In case anyone is wondering why we don't merely put the menus in a .js file,
we used to. But client-side performance was horrible on our typical desktop
(which was a sub-500MHz Celeron with 64 MB RAM) back when the current
interface was implemented.
**By "failover", I mean the target URL of a link that the browser will
follow if scripting fails. A generic example:

<A HREF="hr.asp" ONCLICK="showMenu('HR');return false">Human Resources</A>

If the browser has scripting turned off -OR- if the click event results in
some type of error, the user is sent to the failover page, which contains
the contents of that particular dropdown menu.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #6
I do not mean to offend or annoy any member of this list. Yes, I
multiposted, but I did not intend for these messages to multipost all to
post to some area of developersdex. I use google groups, and just used
the different asp groups referenced there, figuring I would get my
question out to more people, therefore a higher likelyhood of a
solution.

My bad for posting in a db group. It won't happen again.

Again, I'm sorry for those I annoyed, and thanks again for the solutions
offered.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: DC Gringo | last post by:
I have some code that writes log entries upon errors in an VB.NET web app. I can write the Message but in the log, preceding my message is the following: Description: The description for...
2
by: Ralph Krausse | last post by:
I want to create my own kind of counter, for myself. I have a resume page on my site. I want to know how many people go there but dont want to 'go there' myself because I don't want to increase the...
2
by: Eric Mitchell | last post by:
Hello all, I am using the document.write() method to create new content on the same page, however... I need to create a new button using this method (button in HTML). Complicating the matter...
5
by: s_m_b | last post by:
function saveState() { document.write (" | <a href = 'myhomepage.asp? view=mhp&amp;action=save&amp;pb="); >> document.write (document.phone.style.display.value); document.write ("'>save view</a>"); };...
3
by: weston | last post by:
I'm making a foray into trying to create custom vertical scrollbars and sliders, and thought I had a basic idea how to do it, but seem to be having some trouble with the implementation. My...
2
by: Michael D'Angelo | last post by:
We have a machine running Windows 2000 which is running a 3rd party application. We recently installed ASP.NET 2.0 on the server to install some addons for this application. When attempting to...
8
by: MLH | last post by:
130 Targets(0) = "smtp:CRCI@NorthState.net" 135 MySubject = "Some relevant subject" 140 MyBodyText = "Blah, blah, blah" 150 Call SendMailWithOE(MySubject, MyBodyText, Targets) ...
0
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
I'm attempting to create an objectdatasource of the most simple kind to just return a list of file names tobe bound to a grid view basicly i want to just list the file names from a directory with...
3
by: Dylan Parry | last post by:
Hi, I have the following code: private Image _image; public MyImage(string filename) { FileStream file = File.Open(filename, FileMode.Open); _image = Image.FromStream(file);
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.