title: Get Data from HTML Form to MVC Controller
body: <p>I have a nice HTML form that I want to use in a ASP.NET MVC application.</p>
  
  <p>I created a method in controller to get the data via Formcollection and put it into database.</p>
  
  <p>So far so good.</p>
  
  <p>All the tutorials I see work the other way round, i.e. they create the form from the controller.</p>
  
  <p>But I want to get data from html form. How can it be done?</p>
  
  <p>Say I have this form:</p>
  
  <pre><code>&lt;form class="form-horizontal"&gt;
  &lt;fieldset&gt;
  
  &lt;!-- Form Name --&gt;
  &lt;legend&gt;Form Name&lt;/legend&gt;
  
  &lt;!-- Multiple Radios --&gt;
  &lt;div class="form-group"&gt;
    &lt;label class="col-md-4 control-label" for="radios"&gt;Multiple Radios&lt;/label&gt;
    &lt;div class="col-md-4"&gt;
    &lt;div class="radio"&gt;
      &lt;label for="radios-0"&gt;
        &lt;input type="radio" name="radios" id="radios-0" value="1" checked="checked"&gt;
        Option one
      &lt;/label&gt;
      &lt;/div&gt;
    &lt;div class="radio"&gt;
      &lt;label for="radios-1"&gt;
        &lt;input type="radio" name="radios" id="radios-1" value="2"&gt;
        Option two
      &lt;/label&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;!-- Textarea --&gt;
  &lt;div class="form-group"&gt;
    &lt;label class="col-md-4 control-label" for="textarea"&gt;Text Area&lt;/label&gt;
    &lt;div class="col-md-4"&gt;                     
      &lt;textarea class="form-control" id="textarea" name="textarea"&gt;default text&lt;/textarea&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to take the data entered by the user (I want to modify the form such that I can access it from the controller) and put it into database, how can it be accomplished by first passing the data into the controller method?</p>