title: Pass Option Select Value to Controller
body: <p>im trying to get the value each time a client selects a option from my Dropdown list to send it back to controller where i use the value on creating a file and then refreshing the page but im unable to do so</p>
  
  <p>This is my Dropdownlist:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;select id="sel0"&gt;
   &lt;option value=""&gt;Todos&lt;/option&gt;
     @foreach (var item in Model.Select(l =&gt; l.Fecha).Distinct())
               {
   &lt;option value="@lines"&gt;@lines&lt;/option&gt;
               }
   &lt;/select&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is my Ajax Call:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> $('#sel0').on('change', function () {
                         dataTable.columns('.fechas').search(this.value).draw();
                     });
  
                     $("form").submit(function () { 
                         $.ajax({
                             url: '@Url.Action("MethodName","HomePosController")',
                             type: 'POST',
                             cache: false,
                             data: { Selected: $("#sel0").val() },
                             success: function (data) {
                                 //
                             }
                         });
                     });</code></pre>
  </div>
  </div>
  </p>
  
  <p>and this is my Controller its named 'HomePosController':</p>
  
  <pre><code> public ActionResult MethodName(string Selected)
      {
          var db = new ArponClientPosContext();
  
          String value = Selected;
          var json4 = JsonConvert.SerializeObject(Selected);
          System.IO.File.WriteAllText(@"C:\inetpub\wwwroot\potzolcalli.brain.arpon.com\valorselected.txt", json4);
          return View("~/Views/HomePos/Index.cshtml", db.Pos.ToList());
      }
  </code></pre>
  
  <p>But whenever y select a option of my dropdown nothing happens, the page its not refreshed nor the file is created what am i doing wrong?</p>