我打开VS 2010后无法识别Asp.net2010中的对象 [英] objects in Asp.net2010 are not recognize after i open VS 2010

查看:75
本文介绍了我打开VS 2010后无法识别Asp.net2010中的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.
我设计了带有一些ASP对象(文本框,单选按钮等)的表单,
并且在页面中有and insert语句,但是我每次都开始打开
Microsoft Visual Studio 2010从一开始,就打开我的解决方案,每当我开始调试出现此错误时:
错误101名称"personlCodeTextBox"在当前上下文中不存在

VS 2010无法识别我之前创建的其他任何项目,因此我不得不关闭VS并一次又一次地重新打开它,以期希望能够识别它.
我不知道该怎么办.

Hi.
i have designed a form with some asp objects (textbox , radiobutton, ...),
and there has been and insert statement in page , but each tim i start to open the
Microsoft visual studio 2010 from begining , and open my solution ,whenevere i start to debug this error occures :
Error 101 The name ''personlCodeTextBox'' does not exist in the current context

and any other items that i had created them befor can not be recognized by VS 2010 and i have to close VS and reopen it again and again with hope to recognize it.
i don''t know what shall i do.

推荐答案


HTML @Page指令:
Hi,
HTML @Page directive:
检查:

1. CodeFile ="ucSupportingDocuments.ascx.cs"
2. Inherits ="UserControls_ucSupportingDocuments"

1. CodeFile="ucSupportingDocuments.ascx.cs"
2. Inherits="UserControls_ucSupportingDocuments"



可能有两个原因:
1.首先检查CodeFile是否指向相同的代码文件.
2.检查类名是否与继承属性匹配. Inherits属性应与您的部分类名称相同.



--Amit



There could be two possible reasons:
1. First check for the CodeFile whether it is pointing to same code file or not.
2. Check for the class name, whether it is matching with the inherit attribute or not. The Inherits attribute should be same as your partial class name.



--Amit


这篇关于我打开VS 2010后无法识别Asp.net2010中的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆