C# in a <%= block will take on any scope colorization from the HTML that contains it. Thus, injecting content into HTML attributes will have the string scope from the attribute value for the entire block:
<div class="thing1 <%= someBool ? "thing2" : "thing3" %>">
The whole C# section would have `string` colorization.
</div>