Click here to Skip to main content
16,020,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
getdetails.Parameters.Add("@S_ID", SqlDbType.Int).Value = lbl.Text
            getdetails.Parameters.Add("@Name", SqlDbType.VarChar).Value = txt1.Text
            getdetails.Parameters.Add("@Subject", SqlDbType.VarChar).Value = txt2.Text
            getdetails.Parameters.Add("@Mark1", SqlDbType.VarChar).Value = txt3.Text
            getdetails.Parameters.Add("@Mark2", SqlDbType.VarChar).Value = txt4.Text





hi in this section(lbl.text) i am getting "Null reference exception unhandled by user code//" whay it means
Posted
Updated 14-Nov-11 0:33am
v2

Check in lbl is null at that point.
Google[^] for more.
 
Share this answer
 
v2
You have to convert to Int type there.
 
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