In visual studio 2010 markup in MVC3 and ASPX pages was collapsible (by closing tag) however it does not seem to be working in visual studio 2012. Anyone know how to get it working? I cant find it in the options...
:-)
In visual studio 2010 markup in MVC3 and ASPX pages was collapsible (by closing tag) however it does not seem to be working in visual studio 2012. Anyone know how to get it working? I cant find it in the options...
:-)
This worked for me in Visual Studio 2013:
<!-- #region Targets -->
<h1>Targets</h1>
<fieldset>
...
</fieldset>
<!-- #endregion -->
This looks like it has already been answered here: Collapse C# block within cshtml and save it However, if you're after automatic collapsing of Razor sections in your cshtml, then it looks like you're out of luck. The usual CTRL-M,M and CTRL-M+CTRL-T chorded shortcuts will work only on the html which you will see have the familiar +/- collapsing indicators on the margin.
Seems to work in Visual Studio 2012
@* <!-- #region Some Name --> *@
@* <!-- #endregion --> *@
For whatever reason
<!-- #region Targets -->
-- Code Here --
<!-- #endregion -->
did not work. It would not let collapse that region.
What did work was:
@{ #region CommentsSection }
-- Code Here --
@{ #endregion CommentsSection }
© 2022 - 2024 — McMap. All rights reserved.