Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to put in comment more than 1 line in ASP ?

Status
Not open for further replies.

ETN

Programmer
Jan 27, 2004
33
CA
Hi all,

I have an easy question.. I've been doing for a while ASP but I never found out how to comment a block of code... [ponder]

If I have 2-3 lines it's ok to put somes ' like:
' response.write("test")

but if i have 15-20 lines.. it's long..

What I am currently doing if i want to comment a block of code:

Code:
%> 
<!-- ********* code is disabled ***********
response.write("test")
......
******** end of comments --> <%

But it's not a good way, even if it works because the client, if he view the source can see my code...

Any others ideas ?
Thanx! :)
 
well, that's more of a language specific question. If you use jscript then /* */ will perform the block comment. VBScript does not have a block comment char set that I am awhere of. So you're stuck with
' comment
' comment
' comment
' comment
' comment

___________________________________________________________________

The answer to your ??'s may be closer then you think. faq333-3811
Join the Northern Illinois/Southern Wisconsin members in Forum1064
 
You cant use other then " ' " and for 1 line as far as i knw for ASP or VBScript.

You can also write all your code using JavaScript instead of VBScript and then use /* */ combination

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
[smile]

___________________________________________________________________

The answer to your ??'s may be closer then you think. faq333-3811
Join the Northern Illinois/Southern Wisconsin members in Forum1064
 
wow you guys answered fast.. :) thanx.. sad althought that Microsoft didnt think about anything for that... it's funny that they didn't put a standard.. like in C it's "/* */", in VB "'" ..
 
If you want to patch out a whole block of code you can always put it between

if true = false then
...
...
end if

statements to stop it running.



Chris.

Indifference will be the downfall of mankind, but who cares?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top