c# - ASP.Net Razor view uses cached value -
I have a problem with my ASP razor ideas.
I take one model, it manipulates and then uses to display results The model is well updated, but visual engine offers the old values and gives new value I But it does not change anything. Alternatively, I know that this is not a client caching problem, because the result is already set to false value by the result Edit There is an update to the code of action that protects basically und a service data model calls As a catalog model, I discovered that when I use BeginCollectionItem therefore the problem does not occur, but as this is a dynamic list, it is not necessary should be there. add Model.Clear () before returning the footage. PartialView (used for partial view postback is the same as a ).
EditorFor does not use the new model price, but instead value That used to be the model when it was posted.
applied OutputCache attribute my action:
[OutputCache (NoStore = true, period = 0, VaryByParam = "*")]
EditorFor .
[HttpPost ] [OutputCache (NoStore = true, duration = 0, VaryByParam = "*")] Task's & lt async public; ActionResult & gt; Edit (StaffingCostRatesForYearViewModel VM) {(ModelState.IsValid) wait {V = M, so TryAsync (() = & gt; Client.UpdateStaffingCostRatesAsync (VM), VM, X = & gt; RestoreDropDowns (X); "Fehler save beim"); } And {Wait for DropDropDown (VM); } Return a partial view ("Editor templates / staffingCostritesForreviewVODODEL", VM); }
I have this same problem, a more unrelated problem is that some features have been posted to empty values, while others were OK. It is also decided for me.
Comments
Post a Comment