It looks like your approach isn’t correct. Since your view already has HTML elements with the same names as the model properties, Razor Pages’ model binder will automatically map those values to the view model. Because of this, you don’t need to use updateModel
. I recommend removing your custom $.ajax
call and instead using jquery-ajax-unobtrusive, which will make your code cleaner, more maintainable, and aligned with the Razor Pages binding conventions.