Visual Studio intellisense不能在一个.ascx文件中工作

时间:2021-07-29 18:33:23

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

我有两个。ascx文件在ASP的同一个文件夹中。净MVC项目。

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.

其中之一就是智能感知。另一方面,它根本不起作用。什么好主意吗?这些文件与顶部相同的@control定义非常相似。

Using VS2008 and C#.

使用VS2008和c#。

2 个解决方案

#1


1  

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

试着重建您的项目。智能感知在视图中不能工作,直到它被构建。

#2


1  

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.

有时我发现删除了设计器。cs文件,然后右击.ascx并选择“转换为Web应用程序”(它会重新生成desinger文件)修复奇怪的智能感知错误。

#1


1  

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

试着重建您的项目。智能感知在视图中不能工作,直到它被构建。

#2


1  

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.

有时我发现删除了设计器。cs文件,然后右击.ascx并选择“转换为Web应用程序”(它会重新生成desinger文件)修复奇怪的智能感知错误。