This post originated from an RSS feed registered with .NET Buzz
by Peter G Provost.
Original Post: VS.NET Tip: Collapsing Lines in an ASPX or HTML File
Feed Title: Peter Provost's Geek Noise
Feed URL: /error.aspx?aspxerrorpath=/Rss.aspx
Feed Description: Technology news, development articles, Microsoft .NET, and other stuff...
One of the things I love about the C# editor in VS.NET is how it lets you collapse
regions into a little plus sign. Then when I want it back I can just click to plus
to see what's there.
I'm currently working on a Windows SharePoint Services (WSS) Site Definition and I'm
using VS.NET to edit the template ASPX files. What I really wanted was a way to collapse
table and div tags down into plus signs so I could get the out of my way.
Well, it turns out you can do it!
Here's how:
Select the text you want to collapse, and choose Outlining | Hide Selection from the
Edit menu (or just use CTRL-M, CTRL-H).
POW! The file now has a collapsed region. You can open and close that region by clicking
the plug sign or using CTRL-M, CTRL-M.
Very cool.
BTW... so far this works in any text file you open in VS.NET. We'll see if that keeps
up.