In Visual Studio 2012, when editing / aspx markup, you can apparently collapse javascript functions if they do not contain special server tags, such as a shortcut for Response.Write <% = .
<strong> Examples:
May crash:
function foo() { var x = 0; }
May not collapse:
function bar() { var x = $find("<%= txtWhatever.ClientID %>"); }
I noticed, as soon as you add the opening tag <% = , the collapse ( - ) option is to the left of the word function disappears, so I know the problem.
It seems to break the whole function, regardless of size / content.
I tried the Web Essentials plugin and Advanced Javascript highlights the plugin , but none of them work for functions with this specific content.
Is there a way to reset functions containing these types of tags?
Thanks -
source share