Region code collapse for JS in Visual Studio 2012 and 2013 ?
#region AutoComplete JS $("#<%=txtBirim.ClientID %>").autocomplete({ source: function (request, response) { $.ajax({ url: '<%=ResolveUrl("~/Classlar/TextboxOtomatik.asmx/BirimGetir") %>', data: "{ 'prefix': '" + request.term + "'}", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", success: function (data) { response($.map(data.d, function (item) { return { label: item.split('-')[0], val: item.split('-')[1] } })) }, Code.... #endregion
Is there anyway to do something like this ?
You can change it in Tools > Options > Environment > Fonts and Colors > Collapsible Region.
Fold Recursively (Ctrl+K Ctrl+[) folds the innermost uncollapsed region at the cursor and all regions inside that region. Unfold Recursively (Ctrl+K Ctrl+]) unfolds the region at the cursor and all regions inside that region. Fold All (Ctrl+K Ctrl+0) folds all regions in the editor.
You can also collapse an outlining region by double-clicking any line in the region on the outlining margin, which appears just to the left of the code. You can see the contents of a collapsed region as a tooltip when you hover over the collapsed region. This topic applies to Visual Studio on Windows.
Visual Studio 2013 lets the developers to have regions within the CSS file and logically group your style rules with in the region . The region here lets the developers to hide them when they don’t need them and display it when needed. Simply add #region within the comment /* */ and then provide the region name .
You can also collapse an outlining region by double-clicking any line in the region on the outlining margin, which appears just to the left of the code. You can see the contents of a collapsed region as a tooltip when you hover over the collapsed region.
You can change it in Tools > Options > Environment > Fonts and Colors > Collapsible Region. When you work in outlined code, you can expand the sections you want to work on, collapse them when you are done, and then move to other sections.
Install web essentials
Use the same name in end region
//#region AutoComplete JS $("#<%=txtBirim.ClientID %>").autocomplete({ source: function(request, response) { $.ajax({ url: '<%=ResolveUrl("~/Classlar/TextboxOtomatik.asmx/BirimGetir") %>', data: "{ 'prefix': '" + request.term + "'}", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", success: function(data) { response($.map(data.d, function(item) { return { label: item.split('-')[0], val: item.split('-')[1] } })) }, Code.... //#endregion AutoComplete JS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With