Solved

Sharepoint Designer 2010 - Any shortcuts to comment or uncomment out html code?

Posted on 2010-11-12
3
5,475 Views
Last Modified: 2012-06-27
Whenever I have html code that spans pages that I want to comment out its a PITA with SPD.  

I guess I am used to VS 2010 - but in Visual Stusio, any code that is highlighted/selected can be commented out via CtrlK+C and uncommented with Ctrl+KU.

How do I quiclly comment out code I have selected in SPD?  I tried the quick edit tag - wrap tag, but it doesn't accept "<!-- -->".  It only allows Div etc...


Otherwise, I have to select the whole tag and contents which jumps to the end tag.  Put --> at the end and then  Hit Ctrl+; twice to jump to the beginning tag and put in <!--.


Is there an easier way, some keyboard shortcut.  Are there any power tools for SPD or addins or macros I could record?

Thanks in advance
0
Comment
Question by:vamail2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 10

Accepted Solution

by:
shahzadbux earned 500 total points
ID: 34124602
Try CTRL+FORWARD SLASH ( / )
0
 

Author Closing Comment

by:vamail2
ID: 34127366
Thanks.  That works but it deletes any highlighted code.   So instead I write a code snippet which retains any highlighted code AND surrounds it with html comment syntax.  For anyone who needs it, the code snippet is simply

<!--
|
 -->

You must use the vertical piping symbol to retain highlighted code.  

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
In case you ever have to remove a faulty web part from a page , add the following to the end of the page url ?contents=1
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question