crosspost: https://orchard.codeplex.com/discussions/473252

When updating Content Items back in 1.6, I was able to get field values on POST from the HttpContext like below:

var lat = HttpContext.Current.Request["Latitude"];

Ever since 1.7, those return null and upon inspecting the request, it doesn't have those properties. I checked some more and couldn't find the fields anymore. I even tried injecting the IHttpContextAccessor but still nothing.

Does anyone know where they are held now?

Any piece of advise or information would be highly appreciated, thanks!

有帮助吗?

解决方案

Do not access post data directly. Use model binding instead. This can be done either with specifically typed and named parameters on a controller action, or through the TryUpdateModel method that is available from driver post methods.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top