bilogoboss

Replace Mutiple Asp Classoc

The way I know of hashing out code within ASP Classic is <%-- --%>. Would this be correct? Or is there another way?

  1. Classic Asp Replace

Removing special characters can be useful if you need to use a resource that does not offer UTF-8 support. You can use this method to replace special chars on a text file, and save its content to a new text file. It is an adaptation from PHP Dev Tips. I think that sometimes it is better to have an. The Replace Function replaces a specified part of a string with a specific string a specified number of times. When you save it as.html and execute it in Internet Explorer, then the above script will produce the following result − Line 1: This is MS VBScript Programming Line 2: This is vbScript.

Peter Mortensen
14.2k19 gold badges88 silver badges115 bronze badges
Developer JayDeveloper Jay

5 Answers

Use a single quote, like:

ASP Classic uses the VBScript/Visual Basic language, and a single quote is commenting in that; <%-- is nothing (I am not 100% sure though).

Peter Mortensen
14.2k19 gold badges88 silver badges115 bronze badges
Sumit GuptaSumit Gupta
1,6564 gold badges24 silver badges35 bronze badges

Beside ', you can comment lines in the old school way:

Which is same with

Peter Mortensen
14.2k19 gold badges88 silver badges115 bronze badges
cemcem

Assuming you mean that you have large block of inline code like the below you want to disable:

Then either comment out each line as described in this other answer or other approach is:

  1. Create a dummy, empty file called 'dummy.asp' and place it in the same folder.
  2. Change the code block to this:

    Note: you need to change only the <% and %>, all other lines can stay intact. Having a src in the script tag will cause the Classic ASP engine to take the file contents instead of taking the script block contents.

Then when you want to uncomment, either do it for each line or put back the <% and %>.

Replace multiple asp classic server
Community
Shadow WizardShadow Wizard
58.4k19 gold badges115 silver badges179 bronze badges

The question says.. ASP classic...

All the above answers are good, but specific to VBScript.

But a classic ASP file can also contain HTML and Javascript

Commenting VBScript code in a classic ASP file:

Sierra college. Refer any of the approved answers.

Commenting HTML code in a classic ASP file:

Refer https://www.w3schools.com/TAGS/tag_comment.asp

Commenting Javascript code in a classic ASP file:

Classic Asp Replace

Refer https://www.w3schools.com/js/js_comments.asp

Pavan ChandakaPavan Chandaka
5,7323 gold badges11 silver badges20 bronze badges

This is the best way to comment out large blocks of code:

AspClassic-GuyAspClassic-Guy

Not the answer you're looking for? Browse other questions tagged asp-classic or ask your own question.