skip to Main Content

ASP.NET Core not post data to Action Model

When posting data to Action Method from Ajax Post to Action Method, model is always null. Tried with FromBody and without it, both fails. I am using .NET Core 7.0 My Controller Action Method [HttpPost] public async Task<JsonResult> AddOrUpdateAddress([FromBody]AddressViewModel model)…

VIEW QUESTION

Adding a new cookie in ASP.NET Core 6

I used the following code to set a cookie in ASP.NET Core 6, but no cookie is created with this code in my browser. var options = new CookieOptions() { Expires = DateTime.Now.AddDays(2), Path = "/" }; Response.Cookies.Append(CookieName, serializer.Serialize(cartItems), options);…

VIEW QUESTION
Back To Top
Search