title: How access selected value drop down list in asp.net mvc?
body: <p>I'm new in ASP.net MVC and  Razor. </p>
  
  <p>I want to save user birthdate using Drop down list , But I don't know how access selected value in controller . 
  I used  <code>TextBoxFor</code> before that it's not appropriate for get date from user . 
  I read a lot of similar question but I didn't understand . </p>
  
  <p>a part of my Register.cshtml :</p>
  
  <pre><code> &lt;div class="form-group"&gt;
          &lt;label class="label"&gt;BirthDate&lt;/label&gt;
          &lt;div class="col-md-10"&gt;
              @Html.TextBoxFor(model =&gt; model.UserBirthDate)
              @Html.ValidationMessageFor(model =&gt; model.UserBirthDate)            
              &lt;select name="Year"&gt;
                  &lt;option value="2000"&gt;2000&lt;/option&gt;
                  &lt;option value="2001"&gt;2001&lt;/option&gt;
                  &lt;option value="2002"&gt;2002&lt;/option&gt;
                  &lt;option value="2003"&gt;2003&lt;/option&gt;
                  &lt;option value="2004"&gt;2004&lt;/option&gt;
                  &lt;option value="2005"&gt;2005&lt;/option&gt;
                  &lt;option value="2006"&gt;2006&lt;/option&gt;
              &lt;/select&gt;
              &lt;select name="Month"&gt;
                  &lt;option value="7"&gt;July&lt;/option&gt;
                  &lt;option value="9"&gt;September&lt;/option&gt;
                  &lt;option value="12"&gt;December&lt;/option&gt;
              &lt;/select&gt;
              &lt;select name="Day"&gt;
                  &lt;option value="1"&gt;1&lt;/option&gt;
                  &lt;option value="2"&gt;2&lt;/option&gt;
                  &lt;option value="3"&gt;3&lt;/option&gt;
                  &lt;option value="4"&gt;4&lt;/option&gt;
              &lt;/select&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>a part of my Controller :</p>
  
  <pre><code>[HttpPost]
      public ActionResult Register(User user)
      {
  
          UserRepositories bluser = new UserRepositories();
  
          if (ModelState.IsValid)
          {
              if(user.UserBirthDate != null)
              {
                 /////
              }
  
              if (bluser.Add(user))
              {
  
                  return MessageBox.Show("Succsess", MessageType.Success);
              }
              else
              {
  
                  return MessageBox.Show(" UNSuccsess", MessageType.Error);
              }
          }
          else
          {
  
  
              return MessageBox.Show(ModelState.GetErrors(), MessageType.Warning);
          }
  
      }
  </code></pre>
  
  <p>user model :</p>
  
  <pre><code>public partial class User
  {
      public int UserID { get; set; }
      public string UserEmail { get; set; }
      public string UserFirstName { get; set; }
      public string UserLastName { get; set; }
      public string UserPassWord { get; set; }
      public string UserCellPhone { get; set; }
      public string UserTell { get; set; }
      public string UserImage { get; set; }
      public string UserAddress { get; set; }
      public Nullable&lt;byte&gt; UserStatus { get; set; }
      public Nullable&lt;System.DateTime&gt; UserBirthDate { get; set; }
      public string UserGender { get; set; }
  }
  </code></pre>
  
  <p>usermetaData.cs</p>
  
  <pre><code>internal class UserMetaData
  {
      [ScaffoldColumn(false)]
      [Bindable(false)]
      public int UserID { get; set; }
  
      public string UserEmail { get; set; }
  
  
      public string UserFirstName { get; set; }
  
  
      public string UserLastName { get; set; }
  
  
      [DataType(DataType.Password)]
      public string UserPassWord { get; set; }
  
      public string UserCellPhone { get; set; }
  
  
      public string UserTell { get; set; }
  
      public string UserImage { get; set; }
      public string UserAddress { get; set; }
  
  
      public Nullable&lt;byte&gt; UserStatus { get; set; }
  
      public Nullable&lt;System.DateTime&gt; UserBirthDate { get; set; }
  
  
      public string UserGender { get; set; }
  }
   }
  namespace NP1.Models
  {
  [MetadataType(typeof(NP1.Models.MetaData.UserMetaData))]
  public partial class User
  {
  
      public string UserConfirmPassWord { get; set; }
  
      public string Year { get; set; }
      public string Month { get; set; }
      public string Day { get; set; }
  }
  </code></pre>