Error creating control Label1 - Object reference not set to an instance of the object

Posted by Prabu_Spark under ASP.NET on 2/25/2013 | Points: 10 | Views : 3102 | Status : [Member] | Replies : 3
Hi sir,
I download one project from the website, after opening i cant able to view the controls like textbox,label,button, i am getting error "Error creating control Label1 - Object reference not set to an instance of the object". I dont know what to do. Kindly give me the solution for this problem.



[Hint: I downloaded many .net project, i am getting same error]

With regards,
J.Prabu.
[Email:prbspark@gmail.com]



Responses

Posted by: Raj.Trivedi on: 2/26/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Prabu_Spark

Have you checked creating a new project...is it giving the error for new projects as well.

If is it only giving the error for downloaded projects then can you upload that project so that we can check.

For time being,

Try Creating a new project and add all the items from the downloaded project to the new project created by you.

See if this works

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabu_Spark on: 2/26/2013 [Member] Starter | Points: 25

Up
0
Down
Hi Raj Trivedi,
I uploaded the project, kindly check the error.
 Download source file

With regards,
J.Prabu.
[Email:prbspark@gmail.com]

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 2/26/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Prabhu,

I have checked the Issue,

The issue is with VS 2010 its a bug that Microsoft is still fixing.

This is because your project has controls added dynamically and that controls has to be overrided

But this is not supported by VS 2010.

Check this out for issue clarification. 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

When i opened the Website VS 2008 it works fine.

So Open the Website in VS2008. It will Work fine

It will ask for conversion. Go ahead and convert it.

And also it will ask you for Framework upgraded also check that.

I am attaching the screenshot please check

The screenshots are for Login.aspx and DV.aspx
 Download source file

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Prabu_Spark, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response