473,385 Members | 1,813 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,385 software developers and data experts.

Hwo to write %> into a file in asp

js
hi,
Hwo to write %> into a file in asp, I got error when I run the script below.
please help. many thanks.

<%
strContent = strContent & "<%"
strContent = strContent & "dim i"
strContent = strContent & "%>"
dim fs, f
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Set f = fs.openTextFile(strPath, 2, true)
f.write strContent
f.close
set f = nothing
set fs = nothing
%>
May 11 '06 #1
1 1314
strContent = strContent & "%" & ">"

Ray at work
"js" <js@so*****@hotmail.com> wrote in message
news:er**************@TK2MSFTNGP05.phx.gbl...
hi,
Hwo to write %> into a file in asp, I got error when I run the script
below. please help. many thanks.

<%
strContent = strContent & "<%"
strContent = strContent & "dim i"
strContent = strContent & "%>"
dim fs, f
Set fs = Server.CreateObject("Scripting.FileSystemObject")
Set f = fs.openTextFile(strPath, 2, true)
f.write strContent
f.close
set f = nothing
set fs = nothing
%>

May 11 '06 #2

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

Similar topics

1
by: Brett | last post by:
We have an application where the iusr_<srvr> has write NTFS permissions to a folder under the wwwroot (i.e. wwwroot\folder) and also there is a SQL Server database where we must give the...
1
by: Bob Murdoch | last post by:
I have a situation where I call a COM object from ASP that is supposed to create a file. On occasion, especially during development, the output of the COM function is an error string rather than...
2
by: bissatch | last post by:
Hi, I am currently writing a simple PHP program that uses an XML file to output rows for a 'Whats New' page. Once written, I will only require updating the XML file and any pages that use the...
2
by: jason hirst | last post by:
Hi, I've created a simple application that reads data from a SQL Server, and appends this to an XML file. The problem is, that the XML data structure seems to go to the top level when I write...
1
by: Joel Finkel | last post by:
Folks, I am unable to execute any ASPX files on a Windows 2000 Server, running as a Primary Domain Controller. The error is "Error BC31019: Unable to write to output file '<filename>'" By...
6
by: Jason Chu | last post by:
situation: I'm uploading file to my application using a java applet sending the request (the file) through socket to my asp.net page. On my asp.net page, I've override the httpmodule to take in...
2
by: polilop | last post by:
OK i know it sounds little bit wierd but here is what i have to do. I have a database in which i store questions and answers, but the questions are about HTML, Javascript, ASP...... So i store...
7
by: samuelberthelot | last post by:
Hi, I have the following in my asp page: <% response.write(Header) %> where Header contains HTML markup such ass <html> <body> .... I must write the code in the aspx file and not in the...
11
by: Michael Powe | last post by:
How can I make an XHTML-compliant form of an expression in this format: document.write("<scr"+"ipt type='text/javascript' src='path/to/file.js'>"+"</scr"+"ipt>"); this turns out to be a...
16
by: Dom | last post by:
Hi, I writing code that will create asp pages using the file system object. I'm trying something like this without much luck <% .. .. 'other code here
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.