I'd like to add the following feature to my mvc application:
Some kind of auto save funcionality for form data. I'm looking for a general direction, where to start modifying my existing code. Is there any well tought out structure or design pattern for this issue already?
In case of the user closes/refreshes the browser, or the network connection drops, I'd like to retrieve the (unfinished) data put in the form, so the user can continue filling it out and submit eventually.
Should I store the data in the session, or in database, maybe browser? Which could be the most efficient way, also where the least amount of modification is needed?
The application currently has a data access layer, entity framework, DI, and devexpress based forms, and controls.
Cookies (Save data across requests and need to be cleared manually)
Database
But according to your description, this function needs to meet the occurrence of multiple situations. And you can’t avoid losing the session when user close the browser.
So I think it is more reasonable to use a database to store this part of the data.
Best regards,
Xudong Peng
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
None
0 Points
1 Post
Auto saving temporary form data in APS.NET MVC
Sep 16, 2020 12:15 PM|dobokocka|LINK
Hi!
I'd like to add the following feature to my mvc application:
Some kind of auto save funcionality for form data. I'm looking for a general direction, where to start modifying my existing code. Is there any well tought out structure or design pattern for this issue already?
In case of the user closes/refreshes the browser, or the network connection drops, I'd like to retrieve the (unfinished) data put in the form, so the user can continue filling it out and submit eventually.
Should I store the data in the session, or in database, maybe browser? Which could be the most efficient way, also where the least amount of modification is needed?
The application currently has a data access layer, entity framework, DI, and devexpress based forms, and controls.
Thanks!
Contributor
2080 Points
662 Posts
Re: Auto saving temporary form data in APS.NET MVC
Sep 17, 2020 06:34 AM|XuDong Peng|LINK
Hi dobokocka,
Usually used to save temporary data, we may use:
But according to your description, this function needs to meet the occurrence of multiple situations. And you can’t avoid losing the session when user close the browser.
So I think it is more reasonable to use a database to store this part of the data.
Best regards,
Xudong Peng