title: How to get the value of "Name" from first row of table every time when table content changes based on dropdown?
body: <p>I want to get the value of "Name" from first row of table when table content changes based on dropdownlist. Currently, this is working when the page first loads. But I want the <code>name</code> value when dropdownlist changes.</p>
  
  <p>Controller</p>
  
  <pre><code>public ActionResult ABC()
  {
      SDetails sDetails=new SDetails();        
      var model = new ClsA();          
      string name = sDetails.Rst().FirstOrDefault().Name;    
      model.firsts = sDetails.Rst();                    
      model.seconds = sDetails.Rs(name);            
      return View(model);
  }
  </code></pre>
  
  <p>View</p>
  
  <pre><code>@model Aplication.Models.ABC.ClsA 
  
  @Html.DropDownListFor(m =&gt; m.drpList, new List&lt;SelectListItem&gt;
  {                       
      new SelectListItem {Value = "ls", Text="Laa" },
      new SelectListItem {Value = "ms", Text = "Maa"},    
  },new { @id = "CountryList"})
  
  &lt;div id=myA&gt;
      @{ Html.RenderPartial("_PartialA", Model.firsts); }
  &lt;/div&gt;
  &lt;div id=myB&gt;
      @{ Html.RenderPartial("_PartialB", Model.seconds);} 
  &lt;/div&gt;
  </code></pre>
  
  <p>_PartialA</p>
  
  <pre><code>@model IEnumerable&lt;Aplication.Models.ABC.first&gt;
  table&gt;
      &lt;tr&gt;
          &lt;th&gt;@Html.DisplayNameFor(m =&gt; m.Name)&lt;/th&gt;
          &lt;th&gt;@Html.DisplayNameFor(m =&gt; m.Address)&lt;/th&gt;            
      &lt;/tr&gt;    
      @foreach (var item in Model)
      {
          &lt;tr&gt;
              &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.Name)&lt;/td&gt;
              &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.Address)&lt;/td&gt;                
          &lt;/tr&gt;
      }
  &lt;/table&gt;
  </code></pre>
  
  <p>_PartialB</p>
  
  <pre><code>@model  IEnumerable&lt;Aplication.Models.ABC.second&gt;
  &lt;table&gt;
      &lt;tr&gt;
         &lt;th&gt;@Html.DisplayNameFor(m =&gt; m.Details)&lt;/th&gt;
          &lt;th&gt;@Html.DisplayNameFor(m =&gt; m.Age)&lt;/th&gt;            
      &lt;/tr&gt;
      @foreach (var item in Model)
      {
          &lt;tr&gt;
              &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.Details)&lt;/td&gt;
              &lt;td&gt;@Html.DisplayFor(modelItem =&gt; item.Age)&lt;/td&gt;                
          &lt;/tr&gt;
      }
  &lt;/table&gt;
  </code></pre>