How to make page to remember the information when user come back to it

Sheikh 21 Reputation points
2021-08-02T13:15:27.44+00:00

Hi All,

I have 2 concerns.

  • I have a web Form in ASP.NET MVC. and it has several pages, When user fills out information in the Form, and user moves to next page and there is another form so on and so forth. My Concern is that when user changes his mind that he wants go back and make changes on the previous page, How can i hold that information when user go back to the previous page?? If anybody can let me know the BEST way to hold that information which doesn't make the application slow down? if multiple users are using the application like 10 people.
  • 2nd concern is that, The web application contains multiple pages, actually all of those pages takes information from user, It is not convenient and good looking to have all those input fields on a single page with the help of scroll bar. I decided to divide them up and put them on multiple pages so that they can organized well, so that is the reason i put them into Multiple pages. WHAT my question is: IS that making multiple pages is good approach in ASP.NET MVC? OR there should be single Page and use WEB TAB control and organize all the controls (Textboxes, dropdownlists etc) on different tabs? and which approach will work BEST? which doesn't make the application slow.

If anyone answer these questions with some good Logic that would be very much appreciated. Looking forward to receive response from you guys soon.

Thanks,
S

Developer technologies ASP.NET ASP.NET Core
Developer technologies ASP.NET Other
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2021-08-02T14:02:22.413+00:00

    The key design decision of any website is state management. There are dozens of options depending on requirements and configuration. Start with the docs

    https://learn.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-5.0


1 additional answer

Sort by: Most helpful
  1. Bryan Valencia 1 Reputation point
    2021-08-02T23:31:00.05+00:00

    The problem you're going to have is that the browser doesn't notify the server when the user hits the "back" button. So any partially entered data on "page 2" won't get posted back - unless you intervene with jQuery.

    You might want to consider using a system with jQuery where the data pages are all in one "page" in a sort of tabbed notebook.
    That way you can use next>> and <<prev buttons to tell jQuery to navigate the pages.

    So for example, Customer info on page1, order info on page2, line items on page 3 and payment info on page 4 - something like that.
    You can set a jQuery script to hide/show the pages on the fly, and the "Save" button to post it all.

    Unless you need the server to do something different on a page based on the previous one, you should be golden.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.