title: Sending parameters from Form To Url.Action
body: <p>I want to pass data from <code>text field</code> to <code>URL.action</code>.</p>
  
  <p>This <code>DIV</code> is used by my ajax, to refresh it whenever the button inside that <code>DIV</code> is pressed. Everything works great. Thing is I need to pass some parameters with that <code>URL.action to controller</code> too. Parameters that are in <code>textfields or dropboxes</code> in the same View. How can I do that?</p>
  
  <p><strong>My div:</strong></p>
  
  <pre><code> &lt;div id="mylist" data-source-url="@Url.Action("lentele", new { status = "good"})"&gt;
  </code></pre>
  
  <p><strong>Dropbox I want to take the chosen value from:</strong></p>
  
  <pre><code>@Html.DropDownList("status", new SelectList(ViewBag.Status, "name", "name"), "Status", new { @class = "btn btn-default dropdown-toggle", style = "width:120px;" })
  </code></pre>
  
  <p>In example if I write <code>status="good"</code> in parameters everything works, and I get what I want. But how can I set to get status from <code>DropDownList</code>?</p>
  
  <p>data-source-url is used as attribute to get url here:</p>
  
  <pre><code>&lt;script&gt;
      function ajaxifyGridMvc(gridContainerSelector, successCallback) {
          $(gridContainerSelector).on("click", ".grid-header a, .grid-pager li a",
              function (event) {
                  var $grid_container = $(event.delegateTarget);
  
                  var baseUrl = $grid_container.attr("data-source-url");
                  var link = $(this).attr("href");
                  $.get(baseUrl + link, function (data) {
                      if (data.Status &lt;= 0) {
                          alert(data.Message);
                          return;
                      }
                      $grid_container.html(data);
                      if ($.isFunction(successCallback))
                          successCallback();
                  });
  
                  return false;
              });
      }
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Answer:</strong></p>
  
  <p>Passing dynamical value to url.action is not possible.
  So had to manage other way and I figured out that I could jsut change baseUrl and set parameters there.</p>
  
  <p>It looks like:</p>
  
  <pre><code>$.get(baseUrl + link + "&amp;slicplate="+ $("#slicplate").val()....
  </code></pre>