comment in ASP page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Louden

    comment in ASP page

    I want to know what's the convenient way to comment out a block in ASP
    pages? I read a book, and I thought we can use /** */ to comment out the
    VBScript in ASP page, but it yields run time error.

    All I know is to use ' but this is very slow if I want to comment out a
    block? Any suggestions??




  • Aaron Bertrand [MVP]

    #2
    Re: comment in ASP page







    "Matthew Louden" <jrefactors@hot mail.com> wrote in message
    news:u9RaRxjfDH A.2332@TK2MSFTN GP12.phx.gbl...[color=blue]
    > I want to know what's the convenient way to comment out a block in ASP
    > pages? I read a book, and I thought we can use /** */ to comment out the
    > VBScript in ASP page, but it yields run time error.
    >
    > All I know is to use ' but this is very slow if I want to comment out a
    > block? Any suggestions??
    >
    >
    >
    >[/color]


    Comment

    • Bob Barrows

      #3
      Re: comment in ASP page

      Matthew Louden wrote:[color=blue]
      > I want to know what's the convenient way to comment out a block in ASP
      > pages? I read a book, and I thought we can use /** */ to comment out
      > the VBScript in ASP page, but it yields run time error.
      >
      > All I know is to use ' but this is very slow if I want to comment out
      > a block? Any suggestions??[/color]

      If you're using Interdev, there is an free Add-in available from
      http://www.platformdev.com/ that allows you to comment/uncomment blocks,
      similar to the functionality in the VB IDE.

      HTH,
      Bob Barrows


      Comment

      • Evertjan.

        #4
        Re: comment in ASP page

        Aaron Bertrand [MVP] wrote on 19 sep 2003 in[color=blue]
        > "Matthew Louden" <jrefactors@hot mail.com> wrote in message[color=green]
        >> I want to know what's the convenient way to comment out a block in
        >> ASP pages? I read a book, and I thought we can use /** */ to comment
        >> out the VBScript in ASP page, but it yields run time error.
        >>
        >> All I know is to use ' but this is very slow if I want to comment out
        >> a block? Any suggestions??[/color]
        >
        > http://www.aspfaq.com/2179[/color]

        Two very usefull tips in 2179, Aaron, though they only dependably work
        for correct code, and the reason for remarking out in a debug situation
        often is deselecting a faulty code.

        Suppose you have a spurious "end sub" or "end if" line inside that code ?

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

        However there is another way,
        which most editors [like my EditPad] support:


        Select the block of code you want "remarked" including the line before
        and excluding part of the last line.
        Replace "selected only" all "newline"s with "newline" plus "' "


        Response.write "http://www.aspfaq.com/2179"
        Response.write "http://www.aspfaq.com/2179"
        Response.write "http://www.aspfaq.com/2179"
        Response.write "http://www.aspfaq.com/2179"

        will become:

        ' Response.write "http://www.aspfaq.com/2179"
        ' Response.write "http://www.aspfaq.com/2179"
        ' Response.write "http://www.aspfaq.com/2179"
        ' Response.write "http://www.aspfaq.com/2179"

        The reverse should be obvious.


        --
        Evertjan.
        The Netherlands.
        (Please change the x'es to dots in my emailaddress)

        Comment

        • Adrienne

          #5
          Re: comment in ASP page

          Gazing into my crystal ball I observed "Matthew Louden"
          <jrefactors@hot mail.com> writing in news:u9RaRxjfDH A.2332
          @TK2MSFTNGP12.p hx.gbl:
          [color=blue]
          > I want to know what's the convenient way to comment out a block in ASP
          > pages? I read a book, and I thought we can use /** */ to comment out the
          > VBScript in ASP page, but it yields run time error.
          >
          > All I know is to use ' but this is very slow if I want to comment out a
          > block? Any suggestions??
          >
          >
          >
          >[/color]

          If you're using HTML-Kit [http://www.chami.com/html-kit] you can download
          a plug-in [http://www.chami.com/html-
          kit/plugins/info/frsvbstyleblock comment/] that will do this for you. Just
          highlight the text, hit the button and it's all commented.

          --
          Adrienne Boswell
          Please respond to the group so others can share

          Comment

          Working...