NET:Error Creating Control -"Object Reference Not Set To An Instance Of Object"

这几天,竟遇见些奇葩问题,有的实在懒的写了,这个比较有意思,以前没见过,写个文章记录下:

Error Creating Control -"Object Reference Not Set To An Instance Of Object"

在winforms页面中,所有page的所有服务器控件的位置出现一行红字“Error Creating Control - Object reference not set to an instance of an object”,也无法进行控件拖放,只能在source中编辑代码。

这个结果不方便查看效果,很不正常。

再查找过程中,根据博客园有个人的链接,找到如下地址,

添加if(!this.DesignMode), 判断设计模式,但是感觉不是这个问题,贴出来,欣赏下思路

http://blogs.msdn.com/b/webdev/archive/2010/05/06/another-error-creating-control-in-the-design-view-with-object-reference-not-set-in-visual-studio-2010.aspx

后来发现,组里的同项目人员居然没有问题,一切正常,甚是纳闷,考虑到是否版本问题,framework? xhtml?vs?

仔细检查了以下,发现自己用的是VS2010版本,同事用的vs2010sp1,也就是说有可能是版本问题了,

在公司ftp里找到vs补丁,嘿呀 1.6G,够大。。。  装了老半天,装好之后重启就出现了控件,问题解决。

今天任务弄完之后,仔细想了一下,为何会引起这种情况,项目中,应用到了多个Register指令,同一个文件中自定义多个自定义服务器控件,所以判断可能是此引起的,但是不确定。。

看官,如果找到引发的原因,敬请告知,谢谢

本文仅为记录所用,不做他用。

NET:Error Creating Control -"Object Reference Not Set To An Instance Of Object",布布扣,bubuko.com

时间: 2024-08-07 21:17:44

NET:Error Creating Control -"Object Reference Not Set To An Instance Of Object"的相关文章

另类方法解决设计Web页面出现:Error Creating Control

在B/S开发的过程中,经常会遇到这样的提示:Error Creating Control ,而这些页面明明之前是可以打开的,但还是出现如下图所示: 网上找到的方法是把控件初始化放在OnInit里去写,本人试了下,还是会出现的..... 最后本人找到了一种另类的方法,把原先的aspx后台类名更改,假如是:test =>test2 ,对应前台后面CodeBehind的地方同样需要改成test =>test2,然后保存, 保存完以后,再倒腾一次,按照原来修改的地方把test2 =>test,再

oracle rman catalog--ORA-01580: error creating control backup file

在测试rman catalog时,错误的设置了snapshot路径,报错 RMAN> show snapshot controlfile name; RMAN configuration parameters for database with db_unique_name ORCL are: CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl.f'; # defa

启动MongoDB时,提示:error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

启动MongoDB时,提示: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory [[email protected] ~]# /usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data --logpath /usr/local/mongodb/logs/mon

Server Error in '/' Application.Object reference not set to an instance of an object.

这个错误是数据库角色权限造成的 只选中db.owner就可以了 Server Error in '/' Application.Object reference not set to an instance of an object.,布布扣,bubuko.com Server Error in '/' Application.Object reference not set to an instance of an object.

ArcGIS AddIN异常之:object reference not set to an instance of an object

异常出现在 frmDownload frd = new frmDownload(); frd.ShowDialog(); 在ArcMap中能正常弹出窗体,点击按钮时显示此异常:object reference not set to an instance of an object 网上检索后,基本给的解释都是对象没有实例化,可对象明明实例化了! 想不明白,清理了一下解决方案,然后重新编译生成,再运行就OK 可能原因:由于电脑上之前有过此AddIN插件,当时功能模块没有写完.后来写完后,在目标电脑

动态链接库找不到 : error while loading shared libraries: libgsl.so.0: cannot open shared object file: No such file or directory

问题: 运行gsl(GNU scientific Library)的函数库,用 gcc erf.c -I/usr/local/include -L/usr/local/lib64 -L/usr/local/lib -g -Wall --std=gnu99 -lgsl -lgslcblas -o m.o 编译,之后运行./m.o 提示error while loading shared libraries: libgsl.so.0: cannot open shared object file:

ssm整合时出现 org.springframework.beans.factory.BeanCreationException :Error creating bean with name ‘XXX’ 异常的原因及解决方法

ssm整合时出现 org.springframework.beans.factory.BeanCreationException :Error creating bean with name 'XXX' 异常的原因及解决方法(只是可能出现下列几种,不包含全部) 此异常为:注入 bean 失败异常,也就是找不到注入的bean. 可能有以下几种原因: 1.bean未注解或者注解错误 2.项目整合的时候jar包冲突 3.'XXX'的配置有错误 解决:1,3仔细检查就是,网上大部分的人应该是2这种错误,

Spring Boot 报错:Error creating bean with name 'entityManagerFactory' defined in class path resource

spring boot 写一个web项目,在使用spring-data-jpa的时候,启动报如下错误: Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.2018-04-02 17:00:47.076 ERROR 4648 --- [ main] o.s.boot.SpringApplication : A

[Bug]Object reference not set to an instance of an object.

引言 今天在客户这儿,由一个问题导致,需求的变化,不得不修改代码,在记录日志中出现该问题. 原因 通过id查找相关信息,没有判断是否为null,集合是否有数据. Object reference not set to an instance of an object. 翻译:未将对象引用设置到对象的实例. 总结 这个错误在开发中最常见,由于代码不严谨造成,要考虑到为null的情况,不要嫌麻烦,你现在嫌麻烦,将来麻烦嫌弃你..... [Bug]Object reference not set to