我重命名了aspx文件名,但现在我无法从cs文件到达控件

时间:2021-08-14 21:08:07

I renamed aspx file name but now i can't reach to controls from cs file. I deleted designer.cs file and created by right click on aspx file with Convert To Web Application. But still can't find controls while i press Ctrl+Space (code intellisense).

我重命名了aspx文件名,但现在我无法从cs文件到达控件。我删除了designer.cs文件,并通过右键单击转换为Web应用程序的aspx文件创建。但是当我按下Ctrl + Space(代码intellisense)时仍然无法找到控件。

2 个解决方案

#1


Check that the CodeBehind property in the @Page directive points to the .cs file, and that the Inherits property points to the correct class name in the .cs file.

检查@Page指令中的CodeBehind属性是否指向.cs文件,并且Inherits属性指向.cs文件中的正确类名。

#2


you need to check codebehind property as well as inherieted property that must be the class that you have defined in .cs file

您需要检查codebehind属性以及必须是您在.cs文件中定义的类的继承属性

#1


Check that the CodeBehind property in the @Page directive points to the .cs file, and that the Inherits property points to the correct class name in the .cs file.

检查@Page指令中的CodeBehind属性是否指向.cs文件,并且Inherits属性指向.cs文件中的正确类名。

#2


you need to check codebehind property as well as inherieted property that must be the class that you have defined in .cs file

您需要检查codebehind属性以及必须是您在.cs文件中定义的类的继承属性