I am using
Html.Lazy to render some elements. This is because there is no need for these elements to be re-rendered when many other components of the model change.
However, there are circumstances where I want these elements re-rendered even though their values in the model is unchanged.
Example: Say I have an input box called
- When the user enters a new valid title, the model value is updated (on blur in my case) and the view corresponds to what the user typed.
- When the user enters a new invalid title, the model is not updated, but the view still corresponds to what the user typed (because of
Html.Lazy.lazy). This is when I need a re-render so that the value matches the unchanged model value (and not what the user typed).
How can I achieve this?