When working on a classic asp file in Visual Studio 2010, html is pickup up as being collapsible. I’d like to be able my own regions within normal asp.
How can I add such “regions” ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s no built-in support for this, but you can write your own Macro command which will achieve the same result.
Indeed, this has already been done. See Region Tools For Visual Studio and also a tutorial based upon that work for providing region support in JavaScript (written for Visual Studio 2008, although easily tweaked for Visual Studio 2010).
The macro essentially looks for specifically formatted comment lines then uses the programmability of the IDE’s editor window to provide a “collapsed” area between the two specially formatted comment blocks.
In the JavaScript example, there are two hard-coded constants that represent the specially formatted comment blocks that represent the start and end of regions:
The
//at the start signifies the start of a comment within JavaScript, but this won’t work in “classic ASP”, so you can change this to the relevant comment signifier for VBScript, for example something like: