问题
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:
Try rebuilding your project. Intellisense doesn't work in views until it has been built.
回答2:
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.
来源:https://stackoverflow.com/questions/1371477/visual-studio-intellisense-not-working-in-one-ascx-file