I am working on a project where we would like to give the user the ability to save their half-completed form so they can come back later and complete it. I’m struggling with figuring out exactly how I want to do this. Do I save them in the same pool with the completed applications, only with a special status? I don’t really want to sacrifice the integrity of the completed applications by having to make fields be nullable when I don’t want them to be.
Should I create the same database structure in a different schema to hold the incomplete applications? I could have this other schema be more lax on the database contraints and nullable fields to account for incomplete applications.
Is there an easier way to do this? Is there a way I can just save the viewstate and restore that at a later time?
Thanks for any advice!
There may be a couple of differences between your completed applications and these “half” states:
So I’d use a different database, with the record comprising a few key fields such as the User’s Id, the date, the kind of form they are filling etc. and a blob of the fields they have filled. I’m a Java guy so I don’t know the .NET way to get the blob, but in Java I could serialise the data objects backing the form.
It seems like in C# the techniques have some similarity with Java, at least is I understand this article correctly.
I would think that hand-crafting some simple “saveAsAString” and “readFromString” code would be a little dull but pretty doable if no standard .Net techniques exist.