WriteLine with <% %> and double quote signs

WriteLine with <% %> and double quote signs

am 04.05.2007 17:48:23 von vunet.us

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("")
FileAsp.WriteLine(" <% =Blah %>")

Thanks

Re: WriteLine with <% %> and double quote signs

am 04.05.2007 19:34:44 von reb01501

vunet.us@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("")
> 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"

Re: WriteLine with <% %> and double quote signs

am 04.05.2007 19:37:49 von reb01501

vunet.us@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("")
> 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"

Re: WriteLine with <% %> and double quote signs

am 04.05.2007 20:33:50 von vunet.us

On May 4, 1:34 pm, "Bob Barrows [MVP]"
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("")
> > 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?

Re: WriteLine with <% %> and double quote signs

am 04.05.2007 22:49:57 von reb01501

vunet.us@gmail.com wrote:
> On May 4, 1:34 pm, "Bob Barrows [MVP]"
> 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("")
>>> 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"

Re: WriteLine with <% %> and double quote signs

am 04.05.2007 23:36:04 von Dave Anderson

vunet.us@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("")
> FileAsp.WriteLine(" <% =Blah %>")

Personally, I would do it like this:

FileAsp.WriteLine("<\%@LANGUAGE=\"VBSCRIPT\" CODEPAGE=\"1252\">")
FileAsp.WriteLine("")
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.

Re: WriteLine with <% %> and double quote signs

am 05.05.2007 04:27:49 von Jon Paal

<%
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("")
FileAsp.WriteLine(" <" & "%= Blah %" & "> ")
Set FileAsp = nothing
Set fso = nothing
End Sub

%>



wrote in message news:1178293702.992783.243050@p77g2000hsh.googlegroups.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("")
> FileAsp.WriteLine(" <% =Blah %>")
>
> Thanks
>

Re: WriteLine with <% %> and double quote signs

am 05.05.2007 13:28:37 von reb01501

Dave Anderson wrote:
> vunet.us@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("")
>> FileAsp.WriteLine(" <% =Blah %>")
>
> Personally, I would do it like this:
>
> FileAsp.WriteLine("<\%@LANGUAGE=\"VBSCRIPT\" CODEPAGE=\"1252\">")
> FileAsp.WriteLine("")
> 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"

Re: WriteLine with <% %> and double quote signs

am 06.05.2007 01:29:28 von Dave Anderson

"Bob Barrows [MVP]" wrote:
>> Personally, I would do it like this:
>>
>> FileAsp.WriteLine("<\%@LANGUAGE=\"VBSCRIPT\" CODEPAGE=\"1252\">")
>> FileAsp.WriteLine("")
>> 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.