Solved

Using MVC and Ajax How Do You Get the Browser Back Button to Work?

Posted on 2016-11-07
1
85 Views
Last Modified: 2016-11-09
I have do a search using MVC.  How do you get the browser back button to go back and see the same search query that was used using MVC and Ajax?  The Partial View I am using from the search is disappearing when I click on the browser back button.

Thanks,

Dan
0
Comment
Question by:danielolorenz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 41879810
as you find, this is not supposed to work.
you can use a framework like angular to manage of this for you or use history.pushState to save state and be able to reload it on browser back button. you will need to save or reload your view.
with angularjs it will allow you to do that quickly and simply
not only angularjs but this is my favorite
http://todomvc.com/
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question