0 in my asp.net core project, the form is being posted 2 times, but I have examined it, there is no form on the html side, or I removed the entity code, it still posts 2 times, what is the reason?
public class BlogEtiket : SeoBaseEntity { public string name{ get; set; } public int DilSecenekId { get; set; } public string? CurrentCode { get; set; } [DisplayName("Tasarım")] public int DurumId { get; set; } public Durum? Durum { get; set; } public ICollection<MFTSub>? MFTSubs { get; set; } public ICollection<SectionSub>? SectionSubs { get; set; } }
public IActionResult save() { return View(); } [HttpPost] public IActionResult save(example entity) { if (ModelState.IsValid) { _unitOfWork.repository.savechagn(entity); TempData["Message"] = _MessageBox.Success; return Redirect("list"); } else { ViewBag.ModelStateErrors = ModelState.Values.SelectMany(v => v.Errors).ToList(); TempData["Message"] = _MessageBox.Error; return View(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)