If I have a website that needs to recreate parts of the view whenever item is selected from a dropdown and persist these changes until a user submits by clicking final button “submit”, how should I persist selected values of dropdowns?
Right now I keep them in Session, but I have to reassign all dropdowns after each action, because otherwise they are null
, which ended up in a private method called LoadSession
which is executed in the beginning of every action.
public IActionResult OnGetDropdown1Selected() { LoadSession(); // Rest of logic... }
I was thinking about storing these parts in database instead, because each part is basically its own table, but I don’t understand what to do in a situation where someone abandons creating it and closes the browser. Then I have incomplete items in database that pile up. I would need a job that removes these items, but it looks like an overkill for a very small application with basically 3-4 views.
What is the standard approach where you assemble parts of business objects in a single page and then when user presses “submit”, these are persisted in database? I’m not using any front end framework, only raw ajax.
The post How to assemble bussiness objects between requests on a single page? appeared first on 100% Private Proxies - Fast, Anonymous, Quality, Unlimited USA Private Proxy!.