title: sending value of model property as an ajax parameter
body: <p>I have following form in my view-page </p>
  
  <pre><code>@using (Html.BeginForm())
  {
     @Html.EditorFor(model =&gt; model.Product_ID)
  
     &lt;input id="idd" type="file" class="file"&gt;
  
     // form sumbit button
     &lt;input type = "submit" value="Create" /&gt; 
  
  }
  </code></pre>
  
  <p>I want to send above inserted <code>Product_ID</code> as ajax object route value before click the submit button of this form.for that I created it like this <code>product_ID = Model.Product_ID</code> but this <code>product_ID</code> getting null.</p>
  
  <p></p>
  
  <pre><code>$('#idd').click(function () {
  
      $.ajax({
          url: '@Url.Action("CreateDirectory", "Home",new { product_ID = Model.Product_ID })',
          type: "POST",
  </code></pre>
  
  <p>controller </p>
  
  <pre><code>    [HttpPost]
      public JsonResult CreateDirectory(string product_ID)
      {
        ...........
      }
  </code></pre>
  
  <p><strong>EDIT</strong> </p>
  
  <p>using alert inside above script I try to show that Product_ID</p>
  
  <p><code>alert('@Model.Product_ID');</code></p>
  
  <p>same results not showing value</p>