title: How to populate details fields on combo box selected item change in ASP.net MVC
body: <p>I have following controller class methods for get and post actions of updating a person record in my MVC application using a WCF service. There I'm using a combobox to select the ID. 
  Here is my controller class methods for getting the person details. </p>
  
  <pre><code>public ActionResult updatePerson()
          {
              Service1Client SCOBJ = new Service1Client();
              List&lt;Person&gt; PeLi = SCOBJ.GetPersons().ToList();
              ViewBag.List = PeLi.Select(x =&gt; new SelectListItem
              {
                  Value = (Convert.ToString(x.Id)),
                  Text = x.FName + " " + x.LName
              });
             return View();
          }
  
          [HttpPost]
          public ActionResult updatePerson(Person personobj)
          {
              Service1Client SCOBJ = new Service1Client();
              SCOBJ.UpdatePerson(personobj);
              List&lt;Person&gt; PeLi = SCOBJ.GetPersons().ToList();
              ViewBag.List = PeLi.Select(x =&gt; new SelectListItem
              {
                  Value = (Convert.ToString(x.Id)),
                  Text = x.FName + " " + x.LName
              });
              return View();
          }
  </code></pre>
  
  <p>This is my view. </p>
  
  <pre><code>&lt;form method="post" action="@Url.Action("updatePerson")"&gt;
  
      ID:@Html.DropDownList("Id", new SelectList(ViewBag.List, "Value", "Text"))
      @*&lt;input type="text" name="Id" /&gt;*@ 
      &lt;br /&gt;
      First Name: &lt;input type="text" name="FName" /&gt;
      &lt;br /&gt;
      Middle Name: &lt;input type="text" name="MName" /&gt;
      &lt;br /&gt;
      Last Name: &lt;input type="text" name="LName" /&gt;
      &lt;br /&gt;
      Date of Birth:&lt;input type="date" id="start" name="DOB" value="2018-07-22" min="1900-01-01" max="2000-12-31" /&gt;
      &lt;br /&gt;
      NIC:&lt;input type="text" name="NIC" /&gt;
      &lt;br /&gt;
      Address:&lt;input type="text" name="Adddress" /&gt;
      &lt;br /&gt;
      &lt;input type="submit" value="Insert" /&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to achieve loading details to First Name Middle Name Last Name Address and NIC text fields and DOB date time input field when I change the selected value of the ID. In other word I want to load detail record to all field when i select an ID from select list for ID. 
  How can I achieve this? </p>