WriteLine with <% %> and double quote signs

Discussion in 'ASP General' started by vunet.us@gmail.com, May 4, 2007.

  1. Guest

    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, 2007
    #1
    1. Advertising

  2. 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"
    Bob Barrows [MVP], May 4, 2007
    #2
    1. Advertising

  3. 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"
    Bob Barrows [MVP], May 4, 2007
    #3
  4. Guest

    On May 4, 1:34 pm, "Bob Barrows [MVP]" <>
    wrote:
    > 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, 2007
    #4
  5. wrote:
    > On May 4, 1:34 pm, "Bob Barrows [MVP]" <>
    > wrote:
    >> 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"
    Bob Barrows [MVP], May 4, 2007
    #5
  6. 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.
    Dave Anderson, May 4, 2007
    #6
  7. Dave Anderson wrote:
    > 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"
    Bob Barrows [MVP], May 5, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    528
    john_teague
    Sep 1, 2005
  2. Replies:
    3
    Views:
    13,141
  3. Eric Layman
    Replies:
    3
    Views:
    615
    Rad [Visual C# MVP]
    Apr 14, 2007
  4. Evan
    Replies:
    3
    Views:
    505
    Marc 'BlackJack' Rintsch
    Nov 4, 2008
  5. vikrant
    Replies:
    8
    Views:
    341
    vikrant
    May 17, 2007
Loading...

Share This Page