I am trying to create page in asp.net page and I am getting the following error
Error:-System.NullReferenceException: Object reference not set to an instance of an object. at TestdateAssistor.user_info.Button1_Click1(Object sender, EventArgs e)
at this line
SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Data Source=LAPTOP-O9SI19I0\SQLEXPRESS;Integrated Security=True"].ConnectionString);
This is my complete code
   try
    {
        SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["Data Source=LAPTOP-O9SI19I0\\SQLEXPRESS;Integrated Security=True"].ConnectionString);
        conn.Open();
        String insert = "insert into Table (NAME,ADDRESS,MOBILE NO,ADHAR NO,DOB) values (@name,@add,@mob,@adhar,@dob)";
        SqlCommand com = new SqlCommand(insert,conn);
        com.Parameters.AddWithValue("@name",TextBox1.Text);
        com.Parameters.AddWithValue("@add",TextBox2.Text);
        com.Parameters.AddWithValue("@mob",TextBox3.Text);
        com.Parameters.AddWithValue("@adhar", TextBox4.Text);
        com.Parameters.AddWithValue("@dob", TextBox5.Text);
        com.ExecuteNonQuery();
        Response.Write("Successful Registration!!");
        conn.Close();
    }
    catch (Exception ex)
    {
        Response.Write("Error:-" + ex.ToString());
    }
What changes should I make in the connection string?
 
     
     
    