views:

83

answers:

2

I think the title says it all, but to be clear:

If I put something like:

<%=Model.Project.Id %>

in the body of a strongly typed view, I get full intellisense for my model.

However, if I put:

<a href="/Projects/Edit/<%=Model.Project.Id %>">

With the script being written within an html property (in this case the href="" property), the intellisense doesn't work.

I imagine this is a limitation of VisualStudio, but it seems this is a very common task and should be able to work. Is there a fix for this? Does my version of VisualStudio have a problem?

+2  A: 

Hi,

Intellisense is probably not active in text blocks (between double quotes), which is completely normal.

However i never used Visual Studio to develop asp.net application so i can't tell you how fix it but i have a idea.

Reshaper is a powerful tools for .net applications. It supports asp.net and might do what you need. You should try it !

Niklaos
Will check out Reshaper and report back, ideally VS would provide this natively.
Roger Rogers
I've marked this reply as answer, since it appears to be the reality. If someone comes up with a solution, I'll change the answer.
Roger Rogers
+1  A: 

Can you force IntelliSense to show up? I think the standard shortcut ist CTRL + Space ?

citronas
Just tried this, it does force intellisense, but not in the expected context, i.e. it shows a list of files to populate the href property, not the model property, e.g. Model.Project.[Intellisense here].I think the problem is probably that VS isn't geared towards the kind of behavior common for asp.net MVC.
Roger Rogers