These days, unexpectedly met some wonderful problems, some really lazy write, this is more interesting, have not seen before, write an article record:
Error Creating Control-"Object Reference not Set to an Instance of object"
On the WinForms page, the location of all server controls for all pages appears with a line of red characters "Error Creating control-object reference not set to a instance of an Object" and cannot be controlled You can only edit code in source by dragging and dropping.
This result is not easy to see the effect, it is not normal.
In the search process, according to the blog Park has a personal link, find the following address,
Add if (!this. DesignMode), judge the design pattern, but feel not this problem, paste it out, appreciate the next train of thought
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
Later found that the group of the same project staff actually no problem, all normal, very puzzled, considering whether the version of the problem, the framework? Xhtml? Vs?
Carefully examined the following, found themselves using the VS2010 version, colleagues with the VS2010SP1, that is, it may be a version problem,
Find the VS Patch in company FTP, Hey 1.6G, big enough ... Installed long time, installed after the restart on the control, problem resolution.
After today's mission is finished, think carefully about why this situation, the project, the application of multiple register directives, the same file to customize multiple custom server controls, so the judgment may be caused by this, but not sure:
Crossing, if you find the cause, please let me know, thank you.
This article is used only for records, not for his use.