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 PartialView (used for partial view postback is the same as a ).

The model is well updated, but visual engine offers the old values ​​and gives new value EditorFor does not use the new model price, but instead value That used to be the model when it was posted.

I applied OutputCache attribute my action:

  [OutputCache (NoStore = true, period = 0, VaryByParam = "*")]   

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 EditorFor .

Edit There is an update to the code of action that protects basically und a service data model calls

  [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); }   

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.
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

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -