views:

697

answers:

3

I have two .ascx files in the same folder in an ASP.NET MVC project.

In one of them intellisense is working fine. In the other it does not work at all. Any ideas? The files are very similar with the same @control definition at the top.

Using VS2008 and C#.

+1  A: 

Sometimes I find deleting the designer.cs file, and then right clicking the .ascx and selecting 'Convert To Web Application' (which re-gens the desinger file) fixes weird intellisense errors.

IniTech
Because I'm using ASP.NET MVC this control doesn't have a codebehind file and hence no designer file. Thanks anyway and +1 for a good tip.
Guy
+1  A: 

Try rebuilding your project. Intellisense doesn't work in views until it has been built.

Lance Fisher
I had tried that - I did a clean and rebuild but no luck there.
Guy
A: 

I have the same problem and cannot get it to work. There is no 'Convert to Web Application' option when I right-click on the ascx file. I'm using VS 2008.

Dhawal