Click here to Skip to main content
15,749,072 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Friends i get the following error ....

Null referenceexception was unhandled by user code

i have click the check box this error show (note : error show in login page not in current working page.immediately application closed but back ground worker do the work)
if checkbox clicked only error will be show .otherwise no error....
my code below.....

how to handle this error plz help me...

regards ...
Updated 8-Feb-12 1:34am
Al Moje 8-Feb-12 2:49am    
added pre tag on code.

Hello Sathya,

Somewhere in your code, you are assigning a null value to another variable. You need to add a try-catch block there. somewhat like this

try {
    TextBox3.text = DropDownList3.Items.FindByText(TextBox3.Text).Value
} catch (NullReferenceException ex) {
    TextBox3.text = "(none)";

Thanks!! Hope it help.
Share this answer
Tech Code Freak 8-Feb-12 12:33pm    

Can you post your code and where the error occurred.

Thank You
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