Change the URL in the browser using C # codebehind (NOT seo routing or URL rewriting)

I have a website that has a long list of items to display, so I use Pagination to make loading on the server easier.

However, I am paginating through Ajax, so when the user clicks the Next page or previous page button, the data relay is updated using ajax.

This worked fine until people started clicking on the item and then clicking the back button, it brings them to the first page.

Suppose you scan about 10 pages by clicking the "Next Page" button. The data is changing, but the URL in the browser is not working. And you think you have found what you want, so click on it, the browser loads another page, and when you click "back", the browser takes you to the previous page, but since the URL has not changed, you will return to page 1.

I currently removed ajax, so the URL changed every time, but I saw several sites rewrite the url in the browser when ajax even happens, and I was wondering if I could do the same.

A google search to re-write the URL digs out only routing material, nothing of what I really want (I'm sure I don't use the right words)

, - ? !

ps: , , . , .

+3
1

URL-, js, , , (http://domain/page#anchor - # ). js (, Google Picassa), silverlight . . , . , - , "/" . ( , , , )

+2

Source: https://habr.com/ru/post/1764512/


All Articles