I am making an ASP.NET MVC application with the razor engine.
And I was wondering if it's possible to use Regions in a view.
something like:
#region blabla
<p>@Model.Name</p>
<p>...</p>
#endregion
This does not work. Is there an alternative?
I don't have "CollapseTag" option in my context menu. What I usually do is :
or
use Ctrl+M, Ctrl+H
I am using Microsoft Visual Studio Pro 2013.
If you download Web essential 2013 you can use regions both in your cshtml and javascript files.
Like this (thanks to
@dotnetN00b
for the sample in the comments section):Divs are collapsible so you could always use them with some sort an id to kind of mimic regions.
regions sort-of work in views for me, I can define a region but it will not collapse. If you use @Artur's method of using Collapse Tag you're pretty much there! :)