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

  • SEARCH
  • Home
  • 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 7049209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:59:07+00:00 2026-05-28T02:59:07+00:00

I have table with ajax paging, i can select any page and view data,

  • 0

I have table with ajax paging, i can select any page and view data, but if i press refresh in my browser, it’s shows page number one. How can i stay on the same table page after refreshing?

Here is a part of code.

@using (Ajax.BeginForm(new AjaxOptions() { UpdateTargetId = "users_rows", Url = Url.Action("UsersRows") }))
    {
        <table>
            <thead>
            <tr>
                <th>@Resources.Id</th>
                <th>@Resources.Login</th>
                <th>@Resources.Password</th>
                <th>@Resources.FirstName</th>
                <th>@Resources.LastName</th>
                <th>@Resources.Birthday</th>
                <th>@Resources.IsActive</th>
                <th>@Resources.Role</th>
                <th>@Resources.RegistrationDate</th>
            </tr>
            </thead>
            <tbody id="users_rows">
                @Html.Partial("UsersRows", Model)
            </tbody>
        </table>
    }
    @Html.Partial("Pager", Model)

Pager.cshtml:

@model UserManagmentStudio.Domain.IPager

@if (Model.PageCount > 1)
{
    for (Int32 i = 1; i <= Model.PageCount; i++)
    {
        @Ajax.ActionLink(i.ToString(), "Index", new {page = i},
            new AjaxOptions()
           {
               UpdateTargetId = "users_rows",
               Url = Url.Action("UsersRows", new { page = i }),
           }
        )
        @:&nbsp
    }

}
  • 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-28T02:59:07+00:00Added an answer on May 28, 2026 at 2:59 am

    There is no way to achieve that because you are using AJAX for your pagination and thus never reloading the current page. If you remove the AJAX call and perform full postbacks for your pagination, the url of the browser will be updated and if the user hits <kbd>F5</kbd> he will not loose track of the current page because it will be part of the query string.

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

Sidebar

Related Questions

I'm using jQuery to drive my AJAX UI. I have a table of data,
I have a web page that uses jquery ajax to grab the table markup
I have a page where I load a table of information using ajax. Once
So I have a table of data, and I'm getting data back using ajax.
I have table having 10 rows per page. I am using ajax to delete
I have table on my view page. One of the cells has an ID
I have a page ' foo.html ' that populates a table via AJAX 'ajax.html?options=option1'
I have a table which is updated with ajax and after update it if
I have a table body that grabs it's rows (and form fields) via AJAX
I have table rows of data in html being filled from a CGI application.

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.