Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

In my application there are three buttons 1,2 & 3 when I click on buttons 2 & 3 there is no error message. Then when I click button 1 and after that click on buttons 2 and/or 3 I get the following error message:

"Object reference not set to an instance of an object."

null reference exception was unhanded by user code
Posted
Updated 29-Feb-12 19:32pm
v5
Comments
OriginalGriff 28-Feb-12 3:24am    
We need to see the code for the three button click event handlers.
Use the "Improve question" widget to edit your question and provide better information.
Herman<T>.Instance 28-Feb-12 3:27am    
please show your code
Rajeev Jayaram 28-Feb-12 3:32am    
Do you think the information you provided is sufficient for someone to undestand the issue?
Bernhard Hiller 28-Feb-12 9:19am    
The error might rather occur in Question.AddQuestionToDb(qs); or a function called from there.
Can you provide the stack trace, and the code of the function where the error finally occurs.

1 solution

explain it clearly what exactly you are doing with three button.if u calling same event again again with this button may be you are getting the error for that

the meaning of error message is that simply you are forgetting the assign the value to the particullar varaible or method
 
Share this answer
 

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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