Mvc maintain user input on multiple toggled partial views

VopsTrops

New Member
We're using WebForms and I was wondering how this would be done. We have a page where a user is able to dynamically load controls to edit various services to which they are subscribed. This is done by clicking on various menu items, which then load the appropriate control (AJAX style). The catch is that each control is fairly heavy duty in terms of database access upon initial load, so when toggling back and forth among various controls, we needed a way to maintain view state on all previously loaded controls while showing only the most currently chosen. I was able to do this by creating a custom control which overrides LoadViewState, also placing each control within a panel and setting the style["display"] on each panel appropriately. It works well but obviously there's quite a bit of overhead involved.My question is - keeping in mind we need to keep all user inputs intact across loaded controls (sorry, partial views) - how can this be done with MVC? I've asked a few people, and the answers involved storing all the user inputs to session variables and using these to reload the views. This struck me as cumbersome, and somewhat of an attempt to simulate ViewState. Is there a better way?
 
Back
Top