Hi,
I try to create a file, but failure.
My code like is:
<%
dim fs
dim tfile
strNum = """1005"""
strInfolink = "snum = " & strSiteNum
set fs=Server.CreateObject("Scripting.FileSystemObject ")
set tfile=fs.CreateTextFile("D:\Inetpub\wwwroot\html\i nfolink.asp")
tfile.WriteLine("<%")
tfile.WriteLine(strInfolink)
tfile.WriteLine("%>")
tfile.close
set tfile=nothing
set fs=nothing
%>
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/html/testing.asp, line 28
tfile.WriteLine("
-----------------^
The problem is '<%', if I take this out, everything is fine.
Thanks.
--
Mark 9 4200
Add a second % sign in both lines.
Mike Ober.
"Mark" <mm***@hotmaill.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hi, I try to create a file, but failure. My code like is:
<% dim fs dim tfile strNum = """1005""" strInfolink = "snum = " & strSiteNum
set fs=Server.CreateObject("Scripting.FileSystemObject ") set tfile=fs.CreateTextFile("D:\Inetpub\wwwroot\html\i nfolink.asp") tfile.WriteLine("<%") tfile.WriteLine(strInfolink) tfile.WriteLine("%>") tfile.close set tfile=nothing set fs=nothing %>
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/html/testing.asp, line 28
tfile.WriteLine(" -----------------^ The problem is '<%', if I take this out, everything is fine. Thanks.
-- Mark
Even better.
Cheers!
Anthony Sullivan
"Michael D. Ober" <obermd-@-alum-mit-edu-nospam> wrote in message
news:8i****************@news.uswest.net... Add a second % sign in both lines.
Mike Ober.
"Mark" <mm***@hotmaill.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl... Hi, I try to create a file, but failure. My code like is:
<% dim fs dim tfile strNum = """1005""" strInfolink = "snum = " & strSiteNum
set fs=Server.CreateObject("Scripting.FileSystemObject ") set tfile=fs.CreateTextFile("D:\Inetpub\wwwroot\html\i nfolink.asp") tfile.WriteLine("<%") tfile.WriteLine(strInfolink) tfile.WriteLine("%>") tfile.close set tfile=nothing set fs=nothing %>
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/html/testing.asp, line 28
tfile.WriteLine(" -----------------^ The problem is '<%', if I take this out, everything is fine. Thanks.
-- Mark
Give this a try Mark...
tfile.WriteLine(chr(60) & "%")
tfile.WriteLine(strInfolink)
tfile.WriteLine("%" & chr(62))
Cheers!
Anthony Sullivan
"Mark" <mm***@hotmaill.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Hi, I try to create a file, but failure. My code like is:
<% dim fs dim tfile strNum = """1005""" strInfolink = "snum = " & strSiteNum
set fs=Server.CreateObject("Scripting.FileSystemObject ") set tfile=fs.CreateTextFile("D:\Inetpub\wwwroot\html\i nfolink.asp") tfile.WriteLine("<%") tfile.WriteLine(strInfolink) tfile.WriteLine("%>") tfile.close set tfile=nothing set fs=nothing %>
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/html/testing.asp, line 28
tfile.WriteLine(" -----------------^ The problem is '<%', if I take this out, everything is fine. Thanks.
-- Mark
> tfile.WriteLine("<%")
tfile.writeline "<" & "%"
Thanks All
Mark
"Mark" <mm***@hotmaill.com> wrote in message
news:#L**************@tk2msftngp13.phx.gbl... Hi, I try to create a file, but failure. My code like is:
<% dim fs dim tfile strNum = """1005""" strInfolink = "snum = " & strSiteNum
set fs=Server.CreateObject("Scripting.FileSystemObject ") set tfile=fs.CreateTextFile("D:\Inetpub\wwwroot\html\i nfolink.asp") tfile.WriteLine("<%") tfile.WriteLine(strInfolink) tfile.WriteLine("%>") tfile.close set tfile=nothing set fs=nothing %>
Microsoft VBScript compilation error '800a0409'
Unterminated string constant
/html/testing.asp, line 28
tfile.WriteLine(" -----------------^ The problem is '<%', if I take this out, everything is fine. Thanks.
-- Mark
> took a long time to process and still not working.
Maybe you could tell us what "not working" means...
The file is not produced. I type http://localhost/createfile.asp in address
bar, and the status bar doesn't move but sounds like IIS engine is trying to
process the file but failed.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:uL**************@TK2MSFTNGP09.phx.gbl... took a long time to process and still not working.
Maybe you could tell us what "not working" means...
<<<<but sounds like IIS engine is trying to process the file but failed>>>>
So, what exactly does that sound like?
vroooommm, vroooommm, sputter, cough, clunk?
:>)
Bob Lehmann
"John Davis" <jr*******@hotmail.com> wrote in message
news:uT**************@tk2msftngp13.phx.gbl... The file is not produced. I type http://localhost/createfile.asp in
address bar, and the status bar doesn't move but sounds like IIS engine is trying
to process the file but failed.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:uL**************@TK2MSFTNGP09.phx.gbl... took a long time to process and still not working.
Maybe you could tell us what "not working" means...
Why do you think it's a syntax issue? Do you have the Norton Virus? http://www.aspfaq.com/2180
"John Davis" <jr*******@hotmail.com> wrote in message
news:uT**************@tk2msftngp13.phx.gbl... The file is not produced. I type http://localhost/createfile.asp in
address bar, and the status bar doesn't move but sounds like IIS engine is trying
to process the file but failed.
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:uL**************@TK2MSFTNGP09.phx.gbl... took a long time to process and still not working.
Maybe you could tell us what "not working" means...
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
by: matatu |
last post by:
Hi to all,
I have a xml file, a substring like:
<a href="#">text</a>
which after an xslt trasform is rendered as (using xsl:output method html):
<a...
|
by: Donald Firesmith |
last post by:
I am having trouble having Google Adsense code stored in XSL converted
properly into HTML. The <> unfortunately become < and > and then
no longer work.
XSL code is:
<script...
|
by: Les Paul |
last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's
just like a Wiki page, but my own very simple version. It's a page full
of plain old HTML content, and then at the bottom,...
|
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...
|
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...
|
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...
|
by: Manish Sawjiani |
last post by:
Dear experts
i have just migrated from asp to asp.net and i am missing the loop for
creating tables. while in asp one could just start a loop anywhere withing <%
%is this out of style in the...
|
by: Nathan Sokalski |
last post by:
My Web.config file contains the following section to register some of my
UserControls:
<pages>
<controls>
<add tagPrefix="NATE" tagName="Banner" src="~/Banner.ascx"/>
<add tagPrefix="NATE"...
|
by: Michael |
last post by:
Since the include function is called from within a PHP script, why
does the included file have to identify itself as a PHP again by
enclosing its code in <?php... <?>
One would assume that the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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,...
|
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...
|
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,...
|
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: 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...
|
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...
|
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...
| |