title: Asp.net mvc passing a C# model to Javascript file
body: <p>I want to pass the value i got it from model to the java-script function 
  <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> &lt;script type="text/javascript"&gt;
   
   var checkin = @Model.Parameters.Checkin.ToString("dd-MM-yyyy");
          var checkout = @Model.Parameters.Checkout.ToString("dd-MM-yyyy");
          
   &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>this function that i want to pass model chick-in and chick-out value  to it:</p>
  
  <pre><code>$('document').ready(function () {       
  
     $("#Arrival").val(checkin);
    $("#Departure").val(checkout); 
   });
  </code></pre>
  
  <p>i tried many solution but it didn't work yet .
  any advice, thanks</p>