Error Creating Control - <ControlName> Object reference not set to an instance of an object

4 posts, 0 answers
  1. Kellie
    Kellie avatar
    29 posts
    Member since:
    Feb 2009

    Posted 10 Dec 2010 Link to this post

    I'm just posting a solution an error I was getting in Visual Studio 2010 as I couldn't seem to find a solution in the Telerik forums when searching. Forgive me if it's already posted.

    When in Design mode all of my telerik controls on the page were showing the error "Error Creating Control - <ControlName> Object reference not set to an instance of an object"

    I googled this error and found the 'workaround' solution at this link here.

    You basically have to go to the OnInit event of your page (or of the class your page is inheriting from) and surround your init code with a check to see if it's not in DesignMode. Once you have surrounded your code with this check, you must close your pages and rebuild the project to make it work.

    here's the code example:

    protected override void OnInit(EventArgs e)
        if (!this.DesignMode)
            //code here

    This is a bug with Visual Studio 2010 and not Telerik.

    Hope this helps someone.
  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 11 Dec 2010 Link to this post

    Hello Kellie,

    Thank you for sharing your findings - thus you can help other Telerik community members who encounter the same design-time issue. Hopefully the VS 2010 SP1 release will address it. I updated your Telerik points for this post.

    Best regards,
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. DevCraft R3 2016 release webinar banner
  4. Stephanie
    Stephanie avatar
    7 posts
    Member since:
    Aug 2010

    Posted 27 Jan 2011 Link to this post

    I had the same issue. Thanks for posting the solution.
  5. Yudhishter
    Yudhishter avatar
    1 posts
    Member since:
    Feb 2016

    Posted 05 Feb Link to this post

    It is because you are using .net visual studio  that is not latest and so you have to update application from one to latest.
    If you open an  application in latest  studio from file menu not from copying files you  will be prompted a dialog box to update the application.Enjoy!!!!!! --------------Yudhishter Sukhija
Back to Top