Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6973799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:09:18+00:00 2026-05-27T17:09:18+00:00

I am looking for some suggestions or possibly a solution I’ve overlooked for an

  • 0

I am looking for some suggestions or possibly a solution I’ve overlooked for an issue I have with a project I am working on. It involves persisting ViewModel data between several requests. Here’s an example:

User is on a specific page that contains a few form fields and a grid of items related to the underlying model. The user needs to add an item or items to the grid, so I have to redirect them to another page to select some of these items. After the user has selected their items on this page, I need to send them back to the original page with the items displayed in the grid.

I have this working, but what I’m doing is before they are redirected to the second page, I am storing the ViewModel for the original page in session, updating the ViewModel appropriately with the selected items on the second page, then redirecting back to the original page and using the ViewModel from session to populate the form fields and grid.

However, I don’t think this is the best solution and scalability is going to be an issue since this project needs to be scalable, and throwing stuff around in session is not a desired solution. I’ve read the multitude of suggested similar questions but I’ve found nothing that really pertains to my specific situation.

Has anyone ever done anything like this and has found more reliable solutions, or possibly has some suggestions on a different implementation. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:09:19+00:00Added an answer on May 27, 2026 at 5:09 pm

    This comes down to a basic web request limitation and every request being essentially “starting again”. Session is definitely built to allow you a place to store things beyond the request model and is your only option UNLESS you want to take on a much more advanced approach using javascript.

    Checkout this post as i have already covered off the primary solutions for editing a list and some of that applies here.

    In your case I would definitely recommend using a modal/dialogue popup for selecting your “other” items as this will remove most of the hassles you’ll encounter by navigating away from the page completely (and if that page is used in other places, you could easily re-use partial views to make it work in a dialogue as well as a page without duplication).
    This will involve a little javascript, but will be much easier to manage as the form will actually stay present on the page and in most cases I’ve encountered is a better user experience.

    Alternatively you’d need to use hidden inputs across the other pages and post your data around through the selection process. Can’t see many ways that this won’t get ugly.

    In conclusion, using session is the only option if you don’t want to make a client side solution. I’d recommend the client solution as jquery has made our lives much easier for these scenarios, but it is more complicated.

    PS If you do decide the dialogue is not the best option and stick with session, don’t panic about it’s scalability as there are ways you can make it more scalable by using other session storage methods like state server or even a dedicated SQL db for it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for a solution to insert some data in a a table
I'm working on a project that requires me to load some of the data
I'm looking for some suggestions on how to go about this. Any input is
I'm looking for some suggestions as to how I could implement a World Map
Looking for some direction here as I'm running into some migration problems. We have
Looking for some help with a Labview data collection program. If I could collect
Looking for some guidance on a WCF service I’m prototyping. I have a WCF
I'm looking for a good technical solution to doing DI in C. I have
I'm looking for some suggestions to check if this is possible. I'm writing a
Looking through some code I came across the following code trTuDocPackTypdBd.update(TrTuDocPackTypeDto.class.cast(packDto)); and I'd like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.