If you are facing error like
nullReferenceException was unhandled by user id
then you have to check your APP name and connection string
check your web.congfig file
<connectionStrings>
<add name="connect" connectionString="Data Source=pc_name\SQLEXPRESS;Initial Catalog=stud;Integrated Security=True"/>
</connectionStrings>
Add name and again back to code behind on page load and check this line
string conStr = WebConfigurationManager.ConnectionStrings["stud"].ConnectionString;
SqlConnection con = new SqlConnection();
In the place of stud that I sactually my database name write add name that is
Add name=”connect” replace with “stud”
nullReferenceException was unhandled by user id
then you have to check your APP name and connection string
check your web.congfig file
<connectionStrings>
<add name="connect" connectionString="Data Source=pc_name\SQLEXPRESS;Initial Catalog=stud;Integrated Security=True"/>
</connectionStrings>
Add name and again back to code behind on page load and check this line
string conStr = WebConfigurationManager.ConnectionStrings["stud"].ConnectionString;
SqlConnection con = new SqlConnection();
In the place of stud that I sactually my database name write add name that is
Add name=”connect” replace with “stud”
0 comments: