How to do region collapse for JS in Visual Studio 2012/2013
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
It worked for me after installing the Visual Studio Advanced Javascript Outlining extension.
You can find the extension here
After installing the extension just restart your Visual Studio and you can use it like this
//#region MyRegionCode Here//#endregion
- select the javascript code you want to hide2.Press (
a.Ctrl+M
then
b.Ctrl+H )then you can can name you region