How can I comment a selected block in vbscript using Visual Web Developer 2010 Express?
Updated : I meant selecting a block and commenting every line. If I do it in Visual Studio Web Developer 2010 the comment created is for html, not for vbscript.
How can I comment a selected block in vbscript using Visual Web Developer 2010 Express?
Updated : I meant selecting a block and commenting every line. If I do it in Visual Studio Web Developer 2010 the comment created is for html, not for vbscript.
use '
<script type="text/vbscript">
Dim myMessage
'myMessage = "I am having a great day!"
myMessage = "I could use a nap..."
'This will print out myMessage to the visitor
document.write(myMessage)
</script>
VBScript only has support for single-line comments.
Example:
Dim myMessage
'myMessage = "I am having a great day!"
myMessage = "I could use a nap..."
'This will print out myMessage to the visitor
document.write(myMessage)
I was using my code between <% %>
only and VS commented my selection as html, but if I use my code in between <script language="vbscript"> </script>
and comment selection it works, it comments as vbscript code.
Copy it to Notepad ++ Ctrl+H
to open Replace. Replace \r\n
to \r\n'
in Extended Search Mode
all lines will be commented with single line comment char '
.