我有一个问题:当我按下 ASP.NET MVC 中的“添加更多”按钮时,它会在
.cshtml
端添加新字段,但我无法在控制器端保存数据。
我的一般目的是我希望按下“添加更多”按钮时打开的字段在数据库中注册为新数据。因此,按下“更多”按钮的次数越多,它应该添加的数据就越多,但它只添加了一次数据。
public class EgitimSeminerViewModel
{
public List<TBL_EgitimSeminerBilgi> EgitimSeminerBilgiList { get; set; }
public EgitimSeminerViewModel()
{
EgitimSeminerBilgiList = new List<TBL_EgitimSeminerBilgi>();
}
}
public partial class TBL_EgitimSeminerBilgi
{
public int EgitimSeminerid { get; set; }
public Nullable<int> GenelBilgiid { get; set; }
public string EgitimKonu { get; set; }
public string EgitimKurum { get; set; }
public string EgitimSuresi { get; set; }
public Nullable<bool> isDelete { get; set; }
public virtual TBL_GenelBilgiler TBL_GenelBilgiler { get; set; }
}