I am working on SharePoint designer to customize page layout in SharePoint 2013

Is there any way to comment and uncomment code like visual studio buttons?

up vote 2 down vote accepted

The SharePoint Designer is not considered a dedicated Code editor or IDE like Visual Studio, However, you can add a comment tag through

  • Keyboard shortcut Ctrl+/.
  • Or from Edit > Insert Tag > Insert comment.

    enter image description here

Note: it's not working with the JS/CSS codes. it's only for HTML code. Also, you will not able comment the highlighted code.


To add a comment on the highlighted HTML, JS, CSS codes, you can create a Code Snippet as mentioned at Comments in SharePoint Designer

enter image description here

For more details, check Comments in SharePoint Designer

No handy buttons for this, but you can just type comment codes...

For HTML:

<!--
  code to comment out
-->

For JavaScript:

/*
  code to comment out
*/

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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