title: Getting a value from a JavaScript function to my ASP.NET / C# Code-Behind
body: <p>I got a code snippet for a date and time picker i found in this place:
  <a href="http://tarruda.github.io/bootstrap-datetimepicker/" rel="nofollow" title="DateTimePicker">Date and Time Picker</a></p>
  
  <p>I didn't manage to insert it into my code normally from some reason so i just used the demo code on the bottom and pasted it in my ASP.NET site and this is the code:</p>
  
  <pre><code>// Head
  
  &lt;link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet"&gt;
  &lt;link rel="stylesheet" type="text/css" media="screen" href="http://tarruda.github.com/bootstrap-datetimepicker/assets/css/bootstrap-datetimepicker.min.css"&gt;
  
  // Body
  
  &lt;div id="datetimepicker" class="input-append date"&gt;
      &lt;input type="text"&gt;&lt;/input&gt;
      &lt;span class="add-on"&gt;
          &lt;i data-time-icon="icon-time" data-date-icon="icon-calendar"&gt;&lt;/i&gt;
      &lt;/span&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript" src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.min.js"&gt;
  &lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      $('#datetimepicker').datetimepicker({
          format: 'dd/MM/yyyy hh:mm',
          pickSeconds: false,
          language: 'en'
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>It works fine and i can see and choose a date and time in my page, but as stated in the API in order to get the time to my Code-Behind i have to use this JavaScript function:</p>
  
  <pre><code>picker.getLocalDate();
  </code></pre>
  
  <p>The problem is it's a JavaScript function which obviously returns some data, and i have no idea how to get it inside my C# code, I've looked everywhere and found some solutions that didn't work out.</p>
  
  <p>Hope you could tell me what should i do to get it, Thanks!</p>