Skip to content Skip to sidebar Skip to footer

Form Data Not Serialized In Asp.net Core Mvc Controller Model

C# model class public class SubCategoryTwoViewModel { public long Id { get; set; } public string SubCatTwoName { get; set; } public CategoryViewModel Category { get; se

Solution 1:

Trying to add the object directly will not work. Instead you can make use of model binding by adding the nested fields with the correct name (separate the property hierarchy with dots). e.g.

formData.append('Category.CategoryId', self.selectCategory());

Post a Comment for "Form Data Not Serialized In Asp.net Core Mvc Controller Model"