Click here to Skip to main content
16,018,949 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
When we create link button Dynamically and add into placeholder ther error occur null reference exception was unhandled by user code please help me to solve this problem.
Posted
Updated 30-Jun-11 22:11pm
v2
Comments
OriginalGriff 1-Jul-11 4:07am    
Without code, we would have to guess. How about you give us a relevant code fragment?
Use the "Improve question" widget to edit your question and provide better information.

If you think this is a real question, then you should not be writing any sort of code that anyone will ever use. As Griff said, there is NO way we can debug code we can't see, and if that's all you know, then you're obviously incapable of debugging/programming, too. I hope no-one is paying you to code. If you're doing a class, talk to the teacher. If you're teaching yourself, try harder and come back to us when you have a real question.
 
Share this answer
 
I'm going to guess that the placeholder has not been initialised at this stage. Set a breakpoint in your code and step over the point where you are attempting to add it. Inspect the variables to see whether any are null.

In future, this should be your first tactic when you get this exception. A quick debug session is a much better bet than waiting for others to solve them for you. Also, if you can't figure out what's wrong, please post the code so that we stand a chance - if you don't we don't have all the information.
 
Share this answer
 
Comments
Christian Graus 1-Jul-11 4:22am    
He's asked this again instead of improving it here. He's obviously clueless, I suspect he will read your answer as 'blah blah blah' and one vote it because it has no code in it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900