question

Sheikh-7195 avatar image
0 Votes"
Sheikh-7195 asked Sheikh-7195 commented

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

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


dotnet-aspnet-core-mvcdotnet-aspnet-core-webapidotnet-aspnet-mvc
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered Sheikh-7195 commented

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://docs.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-5.0


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce Thank you for your reply.
But question is still unclear, what is the best Approach? among all of these? For example if i have 1000 people who are going to use the same application at given time period like 9AM to 12PM everyday. so the site doesn't get slow or generates any problem or perhaps too much load on server. Which approach i should go for? and confidentiality is also concern.
so in a nutshell, site should work fast both client and server side. data should be confidential means no chance of being compromise.

You are an expert, I hope you could help me to decide which option should i go for.

And also TAB on a single works best? or data split on multiple pages which gets deals through different controllers and action methods in asp.net mvc would work best? Please do answer this question as well.

looking forward to hear from your side.
Thanks.

0 Votes 0 ·
BryanValencia-5830 avatar image
0 Votes"
BryanValencia-5830 answered Sheikh-7195 commented

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.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bryan,
Thank you for the explanation! I appreciate that you took time and wrote this reply on my thread!

I got that. But I would like know what is the best practice?? I mean if my application is going to be use like 10,000 people at the same like 9AM to 5PM. during the day time. and is this possible that site will work slow? I mean i just want the site to behave fast it shouldn't go slow neither on client side nor on the server side.

Having tabs on the client side having intervention of JQuery, or Angular. would that make the site on client side heavy? I mean client's browser will work slow? because it does some intervention from server side at some points in all tabs.

Please do let me know your feedback on this. I shall be very Thankful to you.
Thanks

0 Votes 0 ·

You are making assumptions that every application has the same state and caching requirements which is not true. Secondly, you are fabricating a problem that does not currently exist. Can you explain the 10,000 user bottleneck?

As stated above, the framework comes with many tools for managing state. It is up to you to read the documentation and pick a tool that best fits your unknown requirements. At this point, the community cannot make a recommendation because we have no idea what user data you wish to remember.

Typical user data is the username and claims about the user like the user's email address or role. This problem has been solved and is covered extensively in official security and identity documentation. Visual Studio comes with project templates that include user identity options. Often this information is cached in a cookie or token depending on the authentication/authorization design.


0 Votes 0 ·

I actually didn't mean to ask for recommendations. What i meant is to ask Best practices. there are many experts in .NET who actually recommends best practices doing things. If you want i can name those as well. As you know to do a single thing there are different techniques and methods. But wanted to get an opinion from people here who surely have great experience in doing things. I believe.

also you asked for that 10,000 users. that was an instance..

But you replied. I am thankful for that you shared your thoughts. all i meant was just to know the best practices.
Thanks.

0 Votes 0 ·