title: How can I set model input for an object attribute that exist in layers of list with asp tag-helper?
body: <p>I have a model that consists of many layers. On the main frame, there will be an object for basic input and a list of object that contains a model to store view data but inside it, each item will have a data field to store its new value which I will also consider as input data. My problem is I don't know how to call, set that data field inside tag helper since it's cover by list of list. What I want to achieve is to pass all data back to controller.</p>
  <pre><code>public class TenDongThuocCongTy
  {
      public int Id { get; set; }
      public int CauHinhBangId { get; set; }
      public string CongThucDong { get; set; }
      public string TenDong { get; set; }
      public int CauHinhBang_Cha { get; set; }
      [NotMapped]
      public string inputValue { get; set; }
  }
  public class LayThongTinBangThuocCongTyThanhVien
  {
      public int Cttv_ThuocBangId { get; set; }
      public int CauHinhBangID { get; set; }
      public int CttvId { get; set; }
      public string TenDong { get; set; }
      public string CongThucDong { get; set; }
      public string DichCongThuc { get; set; }
      public List&lt;TenDongThuocCongTy&gt; TenDongThuocCongTies { get; set; }
  }
  public class MuaVuTruocUpsertModel
  {
      
      [DisplayName(&quot;Day&quot;)]
      public DateTime? Ngay { get; set; }
  
      [Required(ErrorMessage = &quot;Number&quot;)]
      [DisplayName(&quot;Number&quot;)]
      public int? STT { get; set; }
  }
  
  public class TongHopItemMuaVuTruoc
  {
      public List&lt;LayThongTinBangThuocCongTyThanhVien&gt; MenuItemMuaVutruoc { get; set; }
      public MuaVuTruocUpsertModel muaVuTruocModel {get; set;}
  }
  </code></pre>
  <p>As in the model above, I want to access to the defined meaning of 'inputValue' then put it in:</p>
  <pre><code>@model MFF.Infrastructure.Models.TongHopItemMuaVuTruoc
  &lt;input asp-for=&quot;inputModel&quot; type=&quot;text&quot;/&gt;
  </code></pre>