Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > WriteLine with <% %> and double quote signs

Reply
Thread Tools

WriteLine with <% %> and double quote signs

 
 
vunet.us@gmail.com
Guest
Posts: n/a
 
      05-04-2007
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

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      05-04-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) 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"


 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      05-04-2007
(E-Mail Removed) 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"


 
Reply With Quote
 
vunet.us@gmail.com
Guest
Posts: n/a
 
      05-04-2007
On May 4, 1:34 pm, "Bob Barrows [MVP]" <(E-Mail Removed)>
wrote:
> (E-Mail Removed) 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?

 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      05-04-2007
(E-Mail Removed) wrote:
> On May 4, 1:34 pm, "Bob Barrows [MVP]" <(E-Mail Removed)>
> wrote:
>> (E-Mail Removed) 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"


 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      05-04-2007
(E-Mail Removed) 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.


 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      05-05-2007
Dave Anderson wrote:
> (E-Mail Removed) 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"


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with single-quote and double-quote when using subprocess. Evan Python 3 11-04-2008 12:24 PM
How to handling string contains single quote and double quote vikrant Perl Misc 8 05-17-2007 04:37 PM
Datagrid on load; replace all double single quote to single quote to display to user Eric Layman ASP .Net 3 04-14-2007 07:16 AM
Single Quote Versus Double Quote In A href link knee-dragger@hotmail.com HTML 3 06-13-2006 12:42 AM
Debug.WriteLine and Trace.WriteLine from class. xxx@hotmail.com ASP .Net 1 09-01-2005 01:56 PM



Advertisments