views:

130

answers:

2

I have intellisense when i type this:

<p><%= boolean.falsestring %></p>

I don't have intellisense when i typ this:

<p class="<%= boolean.falsestring %>"></p>

To further clarify (see line below), the first <%=%> doesn't show me intellisense popup, the second however does, why is that?

<p class="<%= boolean.falsestring %>"><%= Boolean.FalseString%></p>
+1  A: 

This is happening because you are putting tags inside an attribute string. The code editor in Visual Studio wants to believe that everything inside the double quotes is a string even though it isn't.

There is nothing wrong with your code - it is simply a bug in the Visual Studio code editor.

Andrew Hare
+1  A: 

The reason why is that when you write <%= %> inside of a string literal it is counted as a part of the string literal. It is not counted as an embedded expression. Hence it is not code and intellisense will not be displayed

JaredPar