创建对象引用未设置为对象实例时出错 [英] Error Creating Object refrence not set to an instance of an object

查看:89
本文介绍了创建对象引用未设置为对象实例时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

asp.net 4.0中的所有控件在设计时出错(错误创建对象引用未设置为对象实例).在浏览器中运行时没有问题.请帮助我解决此问题的任何人

All the controls in the asp.net 4.0 make error in design time(Error Creating Object refrence not set to an instance of an object).While running in browser no problem.Please help me anybody to solve this issue

推荐答案

似乎是一个已知的错误
^ ]
Seems like a known bug
http://blogs.msdn.com/b/webdevtools/archive/2010/05/06/another-error-creating-control-in-the-design-view-with-object-reference-not-set-in-visual-studio-2010.aspx[^]
http://blogs.msdn.com/b/webdevtools/archive/2010/04/15/rendering-issue-in-visual-studio-2010-when-accessing-the-session-state-in-the-oninit-method.aspx[^]

A simple workaround for this issue would be to check if we are in the design mode at the top of the OnInit() method, below the base.OnInit() call.


这篇关于创建对象引用未设置为对象实例时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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