Net:error Creating Control-"Object Reference not Set to an Instance of object"

Source: Internet
Author: User

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.




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.