views:

20

answers:

1

Hi there.
I noticed this in earlier versions of Visual Studio. But now i use VS 2010 and it is still there, so i want to ask if this is supposed to be so, or if its just not fixed yet.

Using the <%= %> tags inside 'real' html tags works and is in most cases the way i use them. But the intellisense and code highlightning does not work and that reduces the readability of the code.

Is this by design, not yet implemented or a bug? Shouldn't we to use them there? What are the alternatives.

For example i have many code parts in the Views, that look like:

<input id="someid" type="text" name="myinput" value="<%= OldData.myinput %>"/>

or

<option value="somevalue" <%= selected ? "selected=\"selected\"" : "" %> >MyOption</option>

How do you code such things?

Thanks for help.

A: 

That's an issue (or a missing feature if you will) that hasn't been fixed in VS2010. Maybe a patch will come later. I've got used to it. When I need Intellisense, I create a <%= %> block somewhere outside in order to test (not very convenient but for those who can't without Intellisense it's an option).

Darin Dimitrov