title: aspnet mvc not arrivable request form data
body: <p>I am building a website in ASPNET MVC architecture. When posting the data on the html form, it gives an error while sending the data to the background in the controller part.</p>
  <pre><code>&lt;form ..... &gt;
      &lt;div class=&quot;form-group&quot; style=&quot;width:50%&quot;&gt;
           &lt;input type=&quot;text&quot; name=&quot;data1&quot; class=&quot;form-control&quot; value=&quot;&quot; style=&quot;background:lightgray&quot; placeholder=&quot;example write..&quot; id=&quot;data1&quot; required&gt;
           &lt;input type=&quot;text&quot; name=&quot;data2&quot; class=&quot;form-control&quot; value=&quot;&quot; id=&quot;data2&quot;&gt;
           &lt;input type=&quot;text&quot; name=&quot;data3&quot; class=&quot;form-control&quot; value=&quot;&quot; id=&quot;data3&quot;&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  <p>Don't get hung up on the names, I've changed them to share on stackoverflow.</p>
  <p>It happens when I change the id and name fields in the html form, but this will lead to having to change more than one field in several places.</p>
  <pre><code>string data1 = Request.Form[&quot;data1&quot;].ToString();
  string data2 = Request.Form[&quot;data2&quot;].ToString();
  string data3 = Request.Form[&quot;data3&quot;].ToString().ToUpper();
  string data4 = Request.Form[&quot;data4&quot;].ToString();
  string data5 = Request.Form[&quot;data5&quot;].ToString();
  string data6 = Request.Form[&quot;data6&quot;].ToString();
  </code></pre>
  <p>Has anyone come across such a silly problem?</p>
  <p>Error text: <strong>System.NullReferenceException: Object reference not set to an instance of an object. at</strong></p>
  <p>I'm watching with F10, data comes in another request form</p>
  <p><a href="https://i.stack.imgur.com/FScqV.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>Try-catch does not come in another field</p>
  <p><a href="https://i.stack.imgur.com/36Qhh.png" rel="nofollow noreferrer">enter image description here</a></p>