title: Object reference not set to an instance of an object. getting this error
body: <p>I am working on an ASP .Net C# project and I am a beginner in web programming. I get the below error at runtime:</p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>Below is my code:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      txtUsername.Focus();
      if (cmbThemes.SelectedItem.Text=="Red")
      {
          pnlSignin.Border.BorderColor = Color.Orange;
      }
  }
  </code></pre>
  
  <p><code>cmbThemes</code> is a <code>ComboBox</code>.</p>
  
  <p>Thanks in advance.</p>