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

WriteLine with <% %> and double quote signs

I create an ASP file using fso.createtextfile. But how do I avoid
double quotes and <% %signs when writing to file?

FileAsp.WriteLine("<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252">")
FileAsp.WriteLine("<!-- #Include file="file.asp" -->")
FileAsp.WriteLine(" <% =Blah %>")

Thanks

May 4 '07 #1
8 4758
vu******@gmail.com wrote:
I create an ASP file using fso.createtextfile. But how do I avoid
double quotes and <% %signs when writing to file?

FileAsp.WriteLine("<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252">")
FileAsp.WriteLine("<!-- #Include file="file.asp" -->")
FileAsp.WriteLine(" <% =Blah %>")

Thanks
Separate them.
FileAsp.WriteLine(" <")
FileAsp.WriteLine(" % =Blah %")
FileAsp.WriteLine(">")

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 4 '07 #2
vu******@gmail.com wrote:
I create an ASP file using fso.createtextfile. But how do I avoid
double quotes and <% %signs when writing to file?

FileAsp.WriteLine("<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252">")
FileAsp.WriteLine("<!-- #Include file="file.asp" -->")
FileAsp.WriteLine(" <% =Blah %>")
Oh! And if you want to write a double quote, you have to escape it by
doubling it:
FileAsp.WriteLine("<%@LANGUAGE=""VBSCRIPT"" CODEPAGE=""1252"">")

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 4 '07 #3
On May 4, 1:34 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
vunet...@gmail.com wrote:
I create an ASP file using fso.createtextfile. But how do I avoid
double quotes and <% %signs when writing to file?
FileAsp.WriteLine("<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252">")
FileAsp.WriteLine("<!-- #Include file="file.asp" -->")
FileAsp.WriteLine(" <% =Blah %>")
Thanks

Separate them.

FileAsp.WriteLine(" <")
FileAsp.WriteLine(" % =Blah %")
FileAsp.WriteLine(">")

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
so source code will be:

<
% =Blah %
>
will it work? maybe I can use command write to append into one line?

May 4 '07 #4
vu******@gmail.com wrote:
On May 4, 1:34 pm, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
>vunet...@gmail.com wrote:
>>I create an ASP file using fso.createtextfile. But how do I avoid
double quotes and <% %signs when writing to file?
>>FileAsp.WriteLine("<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252">")
FileAsp.WriteLine("<!-- #Include file="file.asp" -->")
FileAsp.WriteLine(" <% =Blah %>")
>>Thanks

Separate them.

FileAsp.WriteLine(" <")
FileAsp.WriteLine(" % =Blah %")
FileAsp.WriteLine(">")

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so
I don't check it very often. If you must reply off-line, then remove
the "NO SPAM"

so source code will be:

<
% =Blah %
>>

will it work? maybe I can use command write to append into one line?
No it won't work; but is it such a leap to change my recommendation (which
was done with writing to Response in mind) to
FileAsp.WriteLine(" <" & "%= Blah %" & ">")?

:-)

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 4 '07 #5
vu******@gmail.com wrote:
I create an ASP file using fso.createtextfile. But how do I avoid
double quotes and <% %signs when writing to file?

FileAsp.WriteLine("<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252">")
FileAsp.WriteLine("<!-- #Include file="file.asp" -->")
FileAsp.WriteLine(" <% =Blah %>")
Personally, I would do it like this:

FileAsp.WriteLine("<\%@LANGUAGE=\"VBSCRIPT\" CODEPAGE=\"1252\">")
FileAsp.WriteLine("<!-- #Include file=\"file.asp\" -->")
FileAsp.WriteLine("<\%=Blah%\>")


--
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.
May 4 '07 #6
<%
call CreateAfile

Sub CreateAfile
Dim fso, FileAsp
Set fso = CreateObject("Scripting.FileSystemObject")
Set FileAsp = fso.CreateTextFile("c:\testfile.txt", True)
FileAsp.WriteLine("<%@LANGUAGE=""VBSCRIPT"" CODEPAGE=""1252"">")
FileAsp.WriteLine("<!-- #Include file=""file.asp"" -->")
FileAsp.WriteLine(" <" & "%= Blah %" & "")
Set FileAsp = nothing
Set fso = nothing
End Sub

%>

<vu******@gmail.comwrote in message news:11**********************@p77g2000hsh.googlegr oups.com...
>I create an ASP file using fso.createtextfile. But how do I avoid
double quotes and <% %signs when writing to file?

FileAsp.WriteLine("<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252">")
FileAsp.WriteLine("<!-- #Include file="file.asp" -->")
FileAsp.WriteLine(" <% =Blah %>")

Thanks

May 5 '07 #7
Dave Anderson wrote:
vu******@gmail.com wrote:
>I create an ASP file using fso.createtextfile. But how do I avoid
double quotes and <% %signs when writing to file?

FileAsp.WriteLine("<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252">")
FileAsp.WriteLine("<!-- #Include file="file.asp" -->")
FileAsp.WriteLine(" <% =Blah %>")

Personally, I would do it like this:

FileAsp.WriteLine("<\%@LANGUAGE=\"VBSCRIPT\" CODEPAGE=\"1252\">")
FileAsp.WriteLine("<!-- #Include file=\"file.asp\" -->")
FileAsp.WriteLine("<\%=Blah%\>")
:-) Cruel joke.
Hopefully vunet recognizes javascript vs vbscript.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 5 '07 #8
"Bob Barrows [MVP]" wrote:
>Personally, I would do it like this:

FileAsp.WriteLine("<\%@LANGUAGE=\"VBSCRIPT\" CODEPAGE=\"1252\">")
FileAsp.WriteLine("<!-- #Include file=\"file.asp\" -->")
FileAsp.WriteLine("<\%=Blah%\>")

:-) Cruel joke.
Hopefully vunet recognizes javascript vs vbscript.
It's a funny notion, using JScript to write an ASP script in VBScript, but I
have done worse. Like using a web application to generate and submit JCL on
a mainframe.

--
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.

May 5 '07 #9

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

Similar topics

63
by: Tristan Miller | last post by:
Greetings. Do any popular browsers correctly support <q>, at least for Western languages? I've noticed that Mozilla uses the standard English double-quote character, ", regardless of the lang...
2
by: Shaun | last post by:
Hello! I have a quick question regarding CSS and having it applied to all elements. I am trying to eliminate the gap between a paragraph and a list that usually occurs in html and I've found...
6
by: janzon | last post by:
Hi I have a class Foo that I use both as a Foo<doubleand a Foo<float>. I want to put instances of this class in a list container. The list container itself is a template and need a type...
11
by: Bo Peng | last post by:
Dear C++ experts, I need to store and retrieve a meta information that can be int or double. The program would be significantly simpler if I can handle two types uniformly. Right now, I am using...
9
by: richard_lavoie | last post by:
Hi, I have something like this: vector<floatvec1; and I want to cast it, so I use vector vec2<double= static_cast< vector<double(vec1); I always become a error: syntax error before `>'...
28
by: Kent Feiler | last post by:
1. Here's some html from a W3C recommendations page. <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</DIV> 2.Although I didn't think it would make any difference, I tried it with the...
3
by: J.M. | last post by:
I have data in a double array of length 2N, which actually represents complex numbers with real and imaginary parts interlaced. In other words, elements in this array with even indices represents...
32
by: T. Crane | last post by:
Hi, I'm struggling with how to initialize a vector<vector<double>> object. I'm pulling data out of a file and storing it in the vector<vector<double>object. Because any given file will have a...
5
by: jeremit0 | last post by:
I'm trying to sort a vector<complex<double and can't figure it out. I recognize the problem is that there isn't a default operator< for complex data types. I have written my own operator and can...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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.