locked
Auto saving temporary form data in APS.NET MVC RRS feed

  • Question

  • User-1605694015 posted

    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!

    Wednesday, September 16, 2020 12:15 PM

All replies

  • User-939850651 posted

    Hi dobokocka,

    Usually used to save temporary data, we may use:

    • Session (Keep data across pages)
    • 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

    Thursday, September 17, 2020 6:34 AM