Managing Many to Many relationships in asp.net Wizard Control

Posted by Luis on Stack Overflow See other posts from Stack Overflow or by Luis
Published on 2010-05-27T11:48:58Z Indexed on 2010/05/27 11:51 UTC
Read the original article Hit count: 202

Filed under:
|
|
|
|

Say I have this entity with a lot of attributes. In the input form I have decided to implement a wizard control so I can collect information about this entity in several steps. The problem is that I need to collect information that has been modeled has many to many relationships.

I am planning to use a telerik gridview to manage this (add/edit/delete), the problem is where do I store that data since the entity in a insert form is not created on the database yet. OK so I can store all that info in temporary lists residing in the viewstate, waiting for the final submit where I dump all that in the DB, but one of the steps I am collecting files...now storing files in the viewstate is out of the question, same as as storing them in the session...

I have been thinking of implementing in a way that the user has to submit some info first (say first 3 steps), commit the data to the database creating the parent entity and then start inserting all the childs entities...but this will get weird as it's confusing since on the first steps you not saving the data to the DB and on the next ones you are commiting directly...

Anyone has any thoughts on this?

Thanks

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET