title: Object reference not set to an instance of an object.(C# web application)
body: <p>Please Help Me...from last two days I am facing this issue</p>
  
  <p>My Connection class</p>
  
  <pre><code>public class Connection
  {
      SqlConnection conn;
      SqlCommand cmd;
  
      public void connclose()
      {
          conn.Close();
      }
  
      public Connection()
      {
          SqlConnection conn = new SqlConnection(@"server=ADMIN-PC;database=sample;Integrated security=true");
          SqlCommand cmd = null;
      }
  
      public void nonquery(string qry)
      {
          conn.Open();
          cmd = new SqlCommand(qry, conn);
          cmd.ExecuteNonQuery();
          conn.Close();
      }
  }
  </code></pre>
  
  <p>My Class</p>
  
  <pre><code>public class Master
  {
      Connection conn = new Connection();
  
      public void insert(string name, string place, string company, string post)
      {
          string qry = "insert into company values('" + name + "','" + place + "','" + company + "'.'" + post + "')";
          conn.nonquery(qry);
      }
  }
  </code></pre>
  
  <p>Am not asking you to debug code for me...please just point what is the error..I am a beginner so please..</p>