title: insert date of birth into sql server
body: <p>I made a JavaScript for date of birth, when debugging you choose your day of birth in three drop down boxes. One for days one for months and one for years. I'm working on C# asp.net. The problem is when i click on test(which is submit or confirm) the date is not taken to the database table. It fills empty! Any help would be appreciated..</p>
  
  <p>here's the code:</p>
  
  <p>DateOfBirth.js:</p>
  
  <pre><code>function date_populate(dayfield, monthfield, yearfield) 
  {
      var today = new Date();
      var dayfield = document.getElementById(dayfield);
      var monthfield = document.getElementById(monthfield);
      var yearfield = document.getElementById(yearfield);
  
      for (var i = 0; i &lt; 32; i++) 
      {
          dayfield.options[i] = new Option(i , i + 1)
          dayfield.options[today.getDate()] = new Option(today.getDate(), today.getDate(), true, true)
      }
  
      for (var m = 0; m &lt; 12; m++) 
      {
           monthfield.options[m] = new Option(monthtext[m], monthtext[m])
           monthfield.options[today.getMonth()] = new Option(monthtext[today.getMonth()], monthtext[today.getMonth()], true, true)
      }
  
      var thisyear = today.getFullYear()
      for (var y = 0; y &lt; 100; y++)
      {
          yearfield.options[y] = new Option(thisyear, thisyear)
          thisyear -= 1
      }
  
      yearfield.options[0] = new Option(today.getFullYear(), today.getFullYear(), true, true)
  }
  </code></pre>
  
  <p>Form.asp.cs</p>
  
  <pre><code>protected void Button1_Click(object sender, EventArgs e)
  {
      String D, M, Y, Full;
  
      D = Day.Value.ToString();
      M = Month.Value.ToString();
      Y = Year.Value.ToString();
  
      Full = D + "/" + M + "/" + Y;
  }
  </code></pre>