ASP rendering wierdness

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tek Boy

    ASP rendering wierdness

    I've been experiencing some (reproducable) wierdness when I try to generate
    some very basic HTML using ASP. Check out the following (basic) ASP code:

    =============== =============== =============
    <% Option Explicit

    Const STRING_1 = "/admin/UploadProgress2 .asp"
    Const STRING_A = "AXFFile" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>Untitled </title>
    </head>
    <body>
    <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
    <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
    <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
    </body>
    </html>
    =============== =============== =============



    The problem is that, when I "run" the ASP page and view the HTML source code
    that is generated, I get the following:

    =============== =============== =============

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title>Untitled </title>
    </head>
    <body>
    AXFFile.Server = "www.nbsc.c om"
    AXFFile.Port = 80AXFFile.Objec tName = "/admin/UploadProgress2 .asp"
    </body>
    </html>
    =============== =============== =============



    Why do lines 12 (<%=STRING_A%>. Port =
    <%=Request.Serv erVariables("SE RVER_PORT")%>) and 13
    (<%=STRING_A%>. ObjectName = "<%=STRING_1%>" ) appear as a single line in
    HTML? Can anybody else reproduce this problem, and if so, do you have any
    idea why this is happening? I can always work around it by adding "vbcrlf"
    to the end of each line, but I'd rather not work around it...........

    Any help would be greatly appreciated.... . thanks in advance!


    -= Tek Boy =-


  • Aaron [SQL Server MVP]

    #2
    Re: ASP rendering wierdness

    If you want a carriage return, use <BR>.

    I couldn't reproduce your issue (it all appears on one line), but please
    don't confuse plain text characters with HTML characters...

    --
    Please contact this domain's administrator as their DNS Made Easy services have expired.

    (Reverse address to reply.)




    "Tek Boy" <vejitasweepsNO SPAM@hotmail.co m> wrote in message
    news:#8RDucEuEH A.2128@TK2MSFTN GP11.phx.gbl...[color=blue]
    > I've been experiencing some (reproducable) wierdness when I try to[/color]
    generate[color=blue]
    > some very basic HTML using ASP. Check out the following (basic) ASP code:
    >
    > =============== =============== =============
    > <% Option Explicit
    >
    > Const STRING_1 = "/admin/UploadProgress2 .asp"
    > Const STRING_A = "AXFFile" %>
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    > <html>
    > <head>
    > <title>Untitled </title>
    > </head>
    > <body>
    > <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
    > <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
    > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
    > </body>
    > </html>
    > =============== =============== =============
    >
    >
    >
    > The problem is that, when I "run" the ASP page and view the HTML source[/color]
    code[color=blue]
    > that is generated, I get the following:
    >
    > =============== =============== =============
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    > <html>
    > <head>
    > <title>Untitled </title>
    > </head>
    > <body>
    > AXFFile.Server = "www.nbsc.c om"
    > AXFFile.Port = 80AXFFile.Objec tName = "/admin/UploadProgress2 .asp"
    > </body>
    > </html>
    > =============== =============== =============
    >
    >
    >
    > Why do lines 12 (<%=STRING_A%>. Port =
    > <%=Request.Serv erVariables("SE RVER_PORT")%>) and 13
    > (<%=STRING_A%>. ObjectName = "<%=STRING_1%>" ) appear as a single line in
    > HTML? Can anybody else reproduce this problem, and if so, do you have any
    > idea why this is happening? I can always work around it by adding[/color]
    "vbcrlf"[color=blue]
    > to the end of each line, but I'd rather not work around it...........
    >
    > Any help would be greatly appreciated.... . thanks in advance!
    >
    >
    > -= Tek Boy =-
    >
    >[/color]


    Comment

    • Ray Costanzo [MVP]

      #3
      Re: ASP rendering wierdness

      Reproduced! W2K SP3 server. Same behavior on a WS2003.

      I can't explain it. That is a bit bizarre! If I throw in some other
      characters at the end of the line, all the line breaks appear in the HTML.

      <% Option Explicit %>
      <%
      Const STRING_1 = "/admin/UploadProgress2 .asp"
      Const STRING_A = "AXFFile"
      %>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <html>
      <head>
      <title>Untitled </title>
      </head>
      <body>
      <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
      <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
      <!-- -->







      <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
      </body>
      </html>


      The line breaks show up with that. But if I remove the <!-- -->, they do
      not.

      Ray at work


      "Tek Boy" <vejitasweepsNO SPAM@hotmail.co m> wrote in message
      news:%238RDucEu EHA.2128@TK2MSF TNGP11.phx.gbl. ..[color=blue]
      > I've been experiencing some (reproducable) wierdness when I try to
      > generate
      > some very basic HTML using ASP. Check out the following (basic) ASP code:
      >
      > =============== =============== =============
      > <% Option Explicit
      >
      > Const STRING_1 = "/admin/UploadProgress2 .asp"
      > Const STRING_A = "AXFFile" %>
      > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      > <html>
      > <head>
      > <title>Untitled </title>
      > </head>
      > <body>
      > <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
      > <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
      > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
      > </body>
      > </html>
      > =============== =============== =============
      >
      >
      >
      > The problem is that, when I "run" the ASP page and view the HTML source
      > code
      > that is generated, I get the following:
      >
      > =============== =============== =============
      >
      > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      > <html>
      > <head>
      > <title>Untitled </title>
      > </head>
      > <body>
      > AXFFile.Server = "www.nbsc.c om"
      > AXFFile.Port = 80AXFFile.Objec tName = "/admin/UploadProgress2 .asp"
      > </body>
      > </html>
      > =============== =============== =============
      >
      >
      >
      > Why do lines 12 (<%=STRING_A%>. Port =
      > <%=Request.Serv erVariables("SE RVER_PORT")%>) and 13
      > (<%=STRING_A%>. ObjectName = "<%=STRING_1%>" ) appear as a single line in
      > HTML? Can anybody else reproduce this problem, and if so, do you have any
      > idea why this is happening? I can always work around it by adding
      > "vbcrlf"
      > to the end of each line, but I'd rather not work around it...........
      >
      > Any help would be greatly appreciated.... . thanks in advance!
      >
      >
      > -= Tek Boy =-
      >
      >[/color]


      Comment

      • Ray Costanzo [MVP]

        #4
        Re: ASP rendering wierdness

        What he was talking about is how the actual HTML source appears. The HTML
        file has:
        <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
        <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
        <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"

        which should appear as

        AXFFile.Server = "oldharleyw eb"
        AXFFile.Port = 80
        AXFFile.ObjectN ame = "/admin/UploadProgress2 .asp"

        when doing a view source. But instead, it appears as:

        AXFFile.Server = "oldharleyw eb"
        AXFFile.Port = 80AXFFile.Objec tName = "/admin/UploadProgress2 .asp"

        Ray at work


        "Aaron [SQL Server MVP]" <ten.xoc@dnartr eb.noraa> wrote in message
        news:O7$heuEuEH A.2192@TK2MSFTN GP14.phx.gbl...[color=blue]
        > If you want a carriage return, use <BR>.
        >
        > I couldn't reproduce your issue (it all appears on one line), but please
        > don't confuse plain text characters with HTML characters...
        >
        > --
        > http://www.aspfaq.com/
        > (Reverse address to reply.)
        >
        >
        >
        >
        > "Tek Boy" <vejitasweepsNO SPAM@hotmail.co m> wrote in message
        > news:#8RDucEuEH A.2128@TK2MSFTN GP11.phx.gbl...[color=green]
        >> I've been experiencing some (reproducable) wierdness when I try to[/color]
        > generate[color=green]
        >> some very basic HTML using ASP. Check out the following (basic) ASP
        >> code:
        >>
        >> =============== =============== =============
        >> <% Option Explicit
        >>
        >> Const STRING_1 = "/admin/UploadProgress2 .asp"
        >> Const STRING_A = "AXFFile" %>
        >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
        >> <html>
        >> <head>
        >> <title>Untitled </title>
        >> </head>
        >> <body>
        >> <%=S[/color][/color]


        Comment

        • Dave Anderson

          #5
          Re: ASP rendering wierdness

          Tek Boy wrote:[color=blue]
          > <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
          > <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
          > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"[/color]

          I have seen similar behavior, wherein the space below is "dropped" from the
          output:
          <%=var1%> <%=var2%>

          I get around it with non-breaking spaces...
          <%=var1%>&nbsp; <%=var2%>

          ....or concatenation.. .
          <%=var1 & " " &var2%>

          ....and assume the reason has to do with optimization by the parser. Note
          that in your example, there is a necessary (because of the quote) context
          switch between lines 1&2, but the server-side blocks at the end of 2 and the
          beginning of 3 could be considered a single block, which appears to be the
          way it is processed.


          --
          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. Please do not contact
          me directly or ask me to contact you directly for assistance. If your
          question is worth asking, it's worth posting.


          Comment

          • Larry Bud

            #6
            Re: ASP rendering wierdness

            > The problem is that, when I "run" the ASP page and view the HTML source code[color=blue]
            > that is generated, I get the following:[/color]

            doesn't do that for me. It appears as it should. Maybe in your copy
            there's really not a CRLF in there. Just delete the LF between the
            2nd and 3rd statement, and hit enter to put it back.

            What does it matter what the HTML looks like?

            Comment

            • Phillip Windell

              #7
              Re: ASP rendering wierdness

              You need to ad a vbCRLF to the end of the line to force a CRLF at the end of
              the line in the raw HTML.
              Like this:

              <%=STRING_A%>.S erver = <%=Request.Serv erVariables("SE RVER_NAME") & vbCRLF %>
              <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT") & vbCRLF %>
              <%=STRING_A%>.O bjectName = <%=STRING_1 & vbCRLF%>

              Without the shortcut form of "response.write " it would look like this:

              <%
              Response.write STRING_A & ".Server = " &
              Request.ServerV ariables("SERVE R_NAME") & vbCRLF
              Response.write STRING_A & ".Port = " &
              Request.ServerV ariables("SERVE R_PORT") & vbCRLF
              Response.write STRING_A & ".ObjectNam e = " & STRING_1 & vbCRLF
              %>

              If you want the redered HTML to break the same way then add the right "<br>"
              at the end.

              <%=STRING_A%>.S erver = <%=Request.Serv erVariables("SE RVER_NAME") & "<br>" &
              vbCRLF %>
              <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT") & "<br>" &
              vbCRLF %>
              <%=STRING_A%>.O bjectName = <%=STRING_1 & vbCRLF%> <br>

              Without the shortcut form of "response.write " it would look like this:

              <%
              Response.write STRING_A & ".Server = " &
              Request.ServerV ariables("SERVE R_NAME") & "<br>" & vbCRLF
              Response.write STRING_A & ".Port = " &
              Request.ServerV ariables("SERVE R_PORT") & "<br>" & vbCRLF
              Response.write STRING_A & ".ObjectNam e = " & STRING_1 & "<br>" & vbCRLF
              %>

              --

              Phillip Windell [MCP, MVP, CCNA]



              "Tek Boy" <vejitasweepsNO SPAM@hotmail.co m> wrote in message
              news:%238RDucEu EHA.2128@TK2MSF TNGP11.phx.gbl. ..[color=blue]
              > I've been experiencing some (reproducable) wierdness when I try to[/color]
              generate[color=blue]
              > some very basic HTML using ASP. Check out the following (basic) ASP code:
              >
              > =============== =============== =============
              > <% Option Explicit
              >
              > Const STRING_1 = "/admin/UploadProgress2 .asp"
              > Const STRING_A = "AXFFile" %>
              > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
              > <html>
              > <head>
              > <title>Untitled </title>
              > </head>
              > <body>
              > <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
              > <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
              > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
              > </body>
              > </html>
              > =============== =============== =============
              >
              >
              >
              > The problem is that, when I "run" the ASP page and view the HTML source[/color]
              code[color=blue]
              > that is generated, I get the following:
              >
              > =============== =============== =============
              >
              > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
              > <html>
              > <head>
              > <title>Untitled </title>
              > </head>
              > <body>
              > AXFFile.Server = "www.nbsc.c om"
              > AXFFile.Port = 80AXFFile.Objec tName = "/admin/UploadProgress2 .asp"
              > </body>
              > </html>
              > =============== =============== =============
              >
              >
              >
              > Why do lines 12 (<%=STRING_A%>. Port =
              > <%=Request.Serv erVariables("SE RVER_PORT")%>) and 13
              > (<%=STRING_A%>. ObjectName = "<%=STRING_1%>" ) appear as a single line in
              > HTML? Can anybody else reproduce this problem, and if so, do you have any
              > idea why this is happening? I can always work around it by adding[/color]
              "vbcrlf"[color=blue]
              > to the end of each line, but I'd rather not work around it...........
              >
              > Any help would be greatly appreciated.... . thanks in advance!
              >
              >
              > -= Tek Boy =-
              >
              >[/color]


              Comment

              • Saiyan Vejita

                #8
                Re: ASP rendering wierdness

                larrybud2002@ya hoo.com (Larry Bud) wrote in message news:<5db363e0. 0410221056.634e 8248@posting.go ogle.com>...[color=blue][color=green]
                > > The problem is that, when I "run" the ASP page and view the HTML source code
                > > that is generated, I get the following:[/color]
                >
                > doesn't do that for me. It appears as it should. Maybe in your copy
                > there's really not a CRLF in there. Just delete the LF between the
                > 2nd and 3rd statement, and hit enter to put it back.
                >
                > What does it matter what the HTML looks like?[/color]

                It matters because it's trying to assign property values to a
                client-side ActiveX component (Software Artisans' XFile). If the two
                lines are not rendered as separate lines of code, the ActiveX
                component sees it as an invalid assignment statement, and causes the
                entire page to fail (where my needs are concerned). Part of the
                reason I abhor client-side validation and error-trapping....... ..

                Comment

                • Saiyan Vejita

                  #9
                  Re: ASP rendering wierdness

                  Thank you _SO_ much for testing it out, Ray. I can't tell you how
                  frustrated I when I found out what was happening, even though my
                  code's syntax was correct. I'm on hold with Microsoft right now, so
                  we'll see what they have to say about all this, and if there's any
                  hope for fixing it.


                  -= Tek Boy=-



                  "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<#DxFgCFuE HA.220@TK2MSFTN GP15.phx.gbl>.. .[color=blue]
                  > Reproduced! W2K SP3 server. Same behavior on a WS2003.
                  >
                  > I can't explain it. That is a bit bizarre! If I throw in some other
                  > characters at the end of the line, all the line breaks appear in the HTML.
                  >
                  > <% Option Explicit %>
                  > <%
                  > Const STRING_1 = "/admin/UploadProgress2 .asp"
                  > Const STRING_A = "AXFFile"
                  > %>
                  > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                  > <html>
                  > <head>
                  > <title>Untitled </title>
                  > </head>
                  > <body>
                  > <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
                  > <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
                  > <!-- -->
                  >
                  >
                  >
                  >
                  >
                  >
                  >
                  > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
                  > </body>
                  > </html>
                  >
                  >
                  > The line breaks show up with that. But if I remove the <!-- -->, they do
                  > not.
                  >
                  > Ray at work
                  >
                  >
                  > "Tek Boy" <vejitasweepsNO SPAM@hotmail.co m> wrote in message
                  > news:%238RDucEu EHA.2128@TK2MSF TNGP11.phx.gbl. ..[color=green]
                  > > I've been experiencing some (reproducable) wierdness when I try to
                  > > generate
                  > > some very basic HTML using ASP. Check out the following (basic) ASP code:
                  > >
                  > > =============== =============== =============
                  > > <% Option Explicit
                  > >
                  > > Const STRING_1 = "/admin/UploadProgress2 .asp"
                  > > Const STRING_A = "AXFFile" %>
                  > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                  > > <html>
                  > > <head>
                  > > <title>Untitled </title>
                  > > </head>
                  > > <body>
                  > > <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
                  > > <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
                  > > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
                  > > </body>
                  > > </html>
                  > > =============== =============== =============
                  > >
                  > >
                  > >
                  > > The problem is that, when I "run" the ASP page and view the HTML source
                  > > code
                  > > that is generated, I get the following:
                  > >
                  > > =============== =============== =============
                  > >
                  > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                  > > <html>
                  > > <head>
                  > > <title>Untitled </title>
                  > > </head>
                  > > <body>
                  > > AXFFile.Server = "www.nbsc.c om"
                  > > AXFFile.Port = 80AXFFile.Objec tName = "/admin/UploadProgress2 .asp"
                  > > </body>
                  > > </html>
                  > > =============== =============== =============
                  > >
                  > >
                  > >
                  > > Why do lines 12 (<%=STRING_A%>. Port =
                  > > <%=Request.Serv erVariables("SE RVER_PORT")%>) and 13
                  > > (<%=STRING_A%>. ObjectName = "<%=STRING_1%>" ) appear as a single line in
                  > > HTML? Can anybody else reproduce this problem, and if so, do you have any
                  > > idea why this is happening? I can always work around it by adding
                  > > "vbcrlf"
                  > > to the end of each line, but I'd rather not work around it...........
                  > >
                  > > Any help would be greatly appreciated.... . thanks in advance!
                  > >
                  > >
                  > > -= Tek Boy =-
                  > >
                  > >[/color][/color]

                  Comment

                  • Saiyan Vejita

                    #10
                    Re: ASP rendering wierdness

                    I know about the spacing behavior you described, and I always
                    explicitly declare a space (using &nbsp;, or Response.Write) when
                    trying to separate two server-generated blocks of text. That
                    "problem" seems to be consistent, though, and is probably by design.

                    It's not as easy to work around the problem when dealing with
                    vBcRlf's, though. Sometimes the line-break is rendered, sometimes it
                    isn't; and according to people in this thread, it occurs on some boxes
                    and not others. Besides, I really don't want to have to attach
                    "vBcRlf" to the end of every line of code, just to make sure it's
                    rendered properly.....


                    -= Tek Boy =-



                    "Dave Anderson" <GTSPXOESSGOQ@s pammotel.com> wrote in message news:<uM9KJQFuE HA.2980@tk2msft ngp13.phx.gbl>. ..[color=blue]
                    > Tek Boy wrote:[color=green]
                    > > <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
                    > > <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
                    > > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"[/color]
                    >
                    > I have seen similar behavior, wherein the space below is "dropped" from the
                    > output:
                    > <%=var1%> <%=var2%>
                    >
                    > I get around it with non-breaking spaces...
                    > <%=var1%>&nbsp; <%=var2%>
                    >
                    > ...or concatenation.. .
                    > <%=var1 & " " &var2%>
                    >
                    > ...and assume the reason has to do with optimization by the parser. Note
                    > that in your example, there is a necessary (because of the quote) context
                    > switch between lines 1&2, but the server-side blocks at the end of 2 and the
                    > beginning of 3 could be considered a single block, which appears to be the
                    > way it is processed.[/color]

                    Comment

                    • Ray Costanzo [MVP]

                      #11
                      Re: ASP rendering wierdness


                      "Saiyan Vejita" <vejitaasp@hotm ail.com> wrote in message
                      news:5e9058da.0 410260719.43e96 9b7@posting.goo gle.com...[color=blue]
                      > I'm on hold with Microsoft right now, so
                      > we'll see what they have to say about all this, and if there's any
                      > hope for fixing it.[/color]

                      Nice! Please post back if they say anything interesting.

                      Thanks,

                      Ray at work


                      Comment

                      • Ben Strackany

                        #12
                        Re: ASP rendering wierdness

                        Try re-adding the CRLF, and type in some spaces after
                        <%=Request.Serv erVariables("SE RVER_PORT")%>.

                        Or force the CRLFs yourself with

                        <%
                        Response.Write STRING_A & ".Server = """ &
                        Request.ServerV ariables("SERVE R_NAME") & """" & char(13) & chr(10)
                        Response.Write STRING_A & ".Port= " & Request.ServerV ariables("SERVE R_PORT")
                        & char(13) & chr(10)
                        Response.Write STRING_A & ".ObjectNam e = " &
                        Request.ServerV ariables("STRIN G_1") & char(13) & chr(10)
                        %>

                        & avoid the situation entirely.

                        --
                        Ben Strackany
                        DevelopmentNow is an award-winning creative software development agency integrating mobile, web, hardware, mixed reality, and emerging technology.



                        "Tek Boy" <vejitasweepsNO SPAM@hotmail.co m> wrote in message
                        news:%238RDucEu EHA.2128@TK2MSF TNGP11.phx.gbl. ..[color=blue]
                        > I've been experiencing some (reproducable) wierdness when I try to[/color]
                        generate[color=blue]
                        > some very basic HTML using ASP. Check out the following (basic) ASP code:
                        >
                        > =============== =============== =============
                        > <% Option Explicit
                        >
                        > Const STRING_1 = "/admin/UploadProgress2 .asp"
                        > Const STRING_A = "AXFFile" %>
                        > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                        > <html>
                        > <head>
                        > <title>Untitled </title>
                        > </head>
                        > <body>
                        > <%=STRING_A%>.S erver = "<%=Request.Ser verVariables("S ERVER_NAME")%>"
                        > <%=STRING_A%>.P ort = <%=Request.Serv erVariables("SE RVER_PORT")%>
                        > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
                        > </body>
                        > </html>
                        > =============== =============== =============
                        >
                        >
                        >
                        > The problem is that, when I "run" the ASP page and view the HTML source[/color]
                        code[color=blue]
                        > that is generated, I get the following:
                        >
                        > =============== =============== =============
                        >
                        > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                        > <html>
                        > <head>
                        > <title>Untitled </title>
                        > </head>
                        > <body>
                        > AXFFile.Server = "www.nbsc.c om"
                        > AXFFile.Port = 80AXFFile.Objec tName = "/admin/UploadProgress2 .asp"
                        > </body>
                        > </html>
                        > =============== =============== =============
                        >
                        >
                        >
                        > Why do lines 12 (<%=STRING_A%>. Port =
                        > <%=Request.Serv erVariables("SE RVER_PORT")%>) and 13
                        > (<%=STRING_A%>. ObjectName = "<%=STRING_1%>" ) appear as a single line in
                        > HTML? Can anybody else reproduce this problem, and if so, do you have any
                        > idea why this is happening? I can always work around it by adding[/color]
                        "vbcrlf"[color=blue]
                        > to the end of each line, but I'd rather not work around it...........
                        >
                        > Any help would be greatly appreciated.... . thanks in advance!
                        >
                        >
                        > -= Tek Boy =-
                        >
                        >[/color]


                        Comment

                        • Saiyan Vejita

                          #13
                          Re: ASP rendering wierdness

                          "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:<#gxL7E3uE HA.3808@TK2MSFT NGP15.phx.gbl>. ..[color=blue]
                          > "Saiyan Vejita" <vejitaasp@hotm ail.com> wrote in message
                          > news:5e9058da.0 410260719.43e96 9b7@posting.goo gle.com...[color=green]
                          > > I'm on hold with Microsoft right now, so
                          > > we'll see what they have to say about all this, and if there's any
                          > > hope for fixing it.[/color]
                          >
                          > Nice! Please post back if they say anything interesting.
                          >
                          > Thanks,
                          >
                          > Ray at work[/color]


                          So, after a few days of the Microsoft customer service rep looking
                          into the problem, I'm told what I already know: that, if there's no
                          visible character appearing on the same line after the closing ASP tag
                          ("%>"), all subsequent whitespace between the "%>" and the next
                          visible character will be disregarded. The only two solutions are: 1)
                          to make sure a visible character appears after the "%>" closing tag on
                          a given line (in my case, a hard-coded <%=vbcrlf%>), or 2) use
                          "Response.Write " statements to write out the text.

                          So, for my needs, I'll probably just stick with my original
                          workaround:

                          =============== =============== ============
                          <% Option Explicit

                          Const STRING_1 = "/admin/UploadProgress2 .asp"
                          Const STRING_A = "AXFFile" %>
                          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                          <html>
                          <head>
                          <title>Untitled </title>
                          </head>
                          <body>
                          <%=STRING_A%>.S erver =
                          "<%=Request.Ser verVariables("S ERVER_NAME")%>"
                          <%=STRING_A%>.P ort =
                          <%=Request.Serv erVariables("SE RVER_PORT")%><% =vbcrlf%>
                          <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
                          </body>
                          </html>
                          =============== =============== ============



                          -= Tek Boy =-

                          Comment

                          • Ray Costanzo [MVP]

                            #14
                            Re: ASP rendering wierdness

                            Very cool. Thank you for the update.

                            Ray at home

                            "Saiyan Vejita" <vejitaasp@hotm ail.com> wrote in message
                            news:5e9058da.0 411021211.268ab 69d@posting.goo gle.com...
                            [color=blue]
                            >
                            > So, after a few days of the Microsoft customer service rep looking
                            > into the problem, I'm told what I already know: that, if there's no
                            > visible character appearing on the same line after the closing ASP tag
                            > ("%>"), all subsequent whitespace between the "%>" and the next
                            > visible character will be disregarded. The only two solutions are: 1)
                            > to make sure a visible character appears after the "%>" closing tag on
                            > a given line (in my case, a hard-coded <%=vbcrlf%>), or 2) use
                            > "Response.Write " statements to write out the text.
                            >
                            > So, for my needs, I'll probably just stick with my original
                            > workaround:
                            >
                            > =============== =============== ============
                            > <% Option Explicit
                            >
                            > Const STRING_1 = "/admin/UploadProgress2 .asp"
                            > Const STRING_A = "AXFFile" %>
                            > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
                            > <html>
                            > <head>
                            > <title>Untitled </title>
                            > </head>
                            > <body>
                            > <%=STRING_A%>.S erver =
                            > "<%=Request.Ser verVariables("S ERVER_NAME")%>"
                            > <%=STRING_A%>.P ort =
                            > <%=Request.Serv erVariables("SE RVER_PORT")%><% =vbcrlf%>
                            > <%=STRING_A%>.O bjectName = "<%=STRING_ 1%>"
                            > </body>
                            > </html>
                            > =============== =============== ============
                            >
                            >
                            >
                            > -= Tek Boy =-[/color]


                            Comment

                            Working...