Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. The Weird and The Wonderful
  4. Obsure ASP.Net Bug?

Obsure ASP.Net Bug?

Scheduled Pinned Locked Moved The Weird and The Wonderful
csharphtmlasp-netvisual-studiosysadmin
10 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AspDotNetDev
    wrote on last edited by
    #1

    I was getting some weird compiler errors and spent about half an hour trying to figure them out. Long story short, this will not compile in ASP.Net:

    <%@ Page Language="vb" %>
    <script runat="server">
    Protected Sub Test()
    Dim s As String = "</script>"
    End Sub
    </script>

    Without opening Visual Studio, any guesses as to why it doesn't compile? I've already figured it out, but I don't want to spoil the surprise. :)

    [WikiLeaks Cablegate Cables]

    M 2 Replies Last reply
    0
    • A AspDotNetDev

      I was getting some weird compiler errors and spent about half an hour trying to figure them out. Long story short, this will not compile in ASP.Net:

      <%@ Page Language="vb" %>
      <script runat="server">
      Protected Sub Test()
      Dim s As String = "</script>"
      End Sub
      </script>

      Without opening Visual Studio, any guesses as to why it doesn't compile? I've already figured it out, but I don't want to spoil the surprise. :)

      [WikiLeaks Cablegate Cables]

      M Offline
      M Offline
      musefan
      wrote on last edited by
      #2

      Is it because Visual Studio has realised the stupidity of VB and now only compiles C#? :laugh:

      return 5;

      J 1 Reply Last reply
      0
      • A AspDotNetDev

        I was getting some weird compiler errors and spent about half an hour trying to figure them out. Long story short, this will not compile in ASP.Net:

        <%@ Page Language="vb" %>
        <script runat="server">
        Protected Sub Test()
        Dim s As String = "</script>"
        End Sub
        </script>

        Without opening Visual Studio, any guesses as to why it doesn't compile? I've already figured it out, but I don't want to spoil the surprise. :)

        [WikiLeaks Cablegate Cables]

        M Offline
        M Offline
        musefan
        wrote on last edited by
        #3

        TBH I had to put it in VS. Seems like a bug in VS right?

        return 5;

        A 1 Reply Last reply
        0
        • M musefan

          Is it because Visual Studio has realised the stupidity of VB and now only compiles C#? :laugh:

          return 5;

          J Offline
          J Offline
          Jason Vetter
          wrote on last edited by
          #4

          Weak...:(

          M 1 Reply Last reply
          0
          • J Jason Vetter

            Weak...:(

            M Offline
            M Offline
            musefan
            wrote on last edited by
            #5

            Interesting choice of words

            return 5;

            1 Reply Last reply
            0
            • M musefan

              TBH I had to put it in VS. Seems like a bug in VS right?

              return 5;

              A Offline
              A Offline
              AspDotNetDev
              wrote on last edited by
              #6

              Yeah, I was thinking of reporting this to Microsoft Connect. Seems like a bug in the parser.

              [WikiLeaks Cablegate Cables]

              M 1 Reply Last reply
              0
              • A AspDotNetDev

                Yeah, I was thinking of reporting this to Microsoft Connect. Seems like a bug in the parser.

                [WikiLeaks Cablegate Cables]

                M Offline
                M Offline
                musefan
                wrote on last edited by
                #7

                They could really do with a good review of the asp editor in general. it is very annoying how it formats code when you start using if/else statements. Also, something like the following causes warnings (even if it is bad coding)

                <% if(true){ %>
                It is true I tell you!

                <% } else { %>
                You will never here from me!
                <% } %>

                return 5;

                A 1 Reply Last reply
                0
                • M musefan

                  They could really do with a good review of the asp editor in general. it is very annoying how it formats code when you start using if/else statements. Also, something like the following causes warnings (even if it is bad coding)

                  <% if(true){ %>
                  It is true I tell you!

                  <% } else { %>
                  You will never here from me!
                  <% } %>

                  return 5;

                  A Offline
                  A Offline
                  AspDotNetDev
                  wrote on last edited by
                  #8

                  What warning does it give? I would think it's a good thing that it warns you of unreachable code.

                  [WikiLeaks Cablegate Cables]

                  M 1 Reply Last reply
                  0
                  • A AspDotNetDev

                    What warning does it give? I would think it's a good thing that it warns you of unreachable code.

                    [WikiLeaks Cablegate Cables]

                    M Offline
                    M Offline
                    musefan
                    wrote on last edited by
                    #9

                    Sorry. Bad example. The warning I mean refers to unmatching div tags

                    return 5;

                    A 1 Reply Last reply
                    0
                    • M musefan

                      Sorry. Bad example. The warning I mean refers to unmatching div tags

                      return 5;

                      A Offline
                      A Offline
                      AspDotNetDev
                      wrote on last edited by
                      #10

                      Oh, I gotcha. Yeah, that is annoying. I usually use an asp:Literal tag to get around that.

                      [WikiLeaks Cablegate Cables]

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups