Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my code line is given below:

objAtt.EmpId = Convert.ToInt16(txtId.Text);//
Posted
Comments
Sanket Saxena 6-Jan-15 7:12am    
Not enough code to understand...where is your txtId textbox placed inside a databound control like gridview etc or what. Elaborate the question with proper code you wrote.

1 solution

This error comes, when one object is not defined/instantiated and you are trying to access the properties. Or the Property you are using has no value to it.
So check for the objects you have used here like objAtt & textId
and see if they have been initialized. Put a debugger and check first.
I hope you get me here.
Please post back your queries if any.
Thanks
 
Share this answer
 

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