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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T20:07:04+00:00 2026-06-18T20:07:04+00:00

I am creating the runtime table in mvc3.net. From controller i am getting the

  • 0

I am creating the runtime table in mvc3.net. From controller i am getting the json collection and in view am creating the runtime table according to json collection

first am just initialising the table

<div id="DisplayBookChapterList" class="fLeft per30 mr15">        
    <table class="contentTable" id="tblDisplayChapterList" >            
         </table>

In Runtime am populating the table rows by below given code

$.getJSON("@Url.Action("GetBookChapterList", "CourseManagement")" + '/' + bookname,  function (data) {
$.each(data, function (key, val) {
                BookChapterlist += '<tr><td style="display:none" id=ChapterListBookID value=' + val.BookID + '>' + val.BookID + '</td><td>' + val.ChapterNo + ' </td><td>' + val.Title + '</td><td><input type=checkbox id="' + val.ChapterID + '"></td></tr>';

}
});               
$('#DisplayBookChapterList table').append(BookChapterlist);

I want to give paging to this dynamically created table.

  • 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-06-18T20:07:05+00:00Added an answer on June 18, 2026 at 8:07 pm

    You’ll want to create the paging links to select a specific page, next, previous, first, last or whatever you need. E.g.

    <ul>        
        @foreach (var page in Enumerable.Range(1, numPages)) {
            <li>@Html.ActionLink(page.ToString(), "GetBookChapterList", "CourseManagement", new {page}, new {@class = "page-link"})</li>
        }        
    </ul>
    

    Note that all links have the css class “page-link”.

    On the server side, add a “page” parameter to your action so you know which page to fetch in the controller.

    Now, back to the HTML code: the href of each link is the address where to fetch the data from and we can use this in our JavaScript code:

    <script>
        $(function() {
            $(".page-link").on('click', function(e) {
                e.preventDefault();
                $.getJSON($(this).attr('href'), function(data) {
                    console.log(data);
                });
            });
        });
    </script>
    

    The nice thing about this approach is that you can make it easily fall back for clients that have JavaScript disabled: in the “GetBookChapterList” action, check if the request is an ajax request (Request.IsAjaxRequest()). If so, return the required JSON data. If not, render a normal, full page showing the selected page of the table.

    This is generally a good approach: if possible, make sure the site works without JavaScript, then add JavaScript to improve it.

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

Sidebar

Related Questions

I am creating a table at runtime using jQuery. The table comes from JSON
In runtime I'm creating a DataTable and using nested for-loops to populate the table.
I am creating a table during runtime. This is how I do it: AdoCommand1.Connection:=AdoConnection1;
I am creating a view at runtime and adding a UITableView as its subview.
I am creating a table at run time after fetching the result from the
I am creating database at runtime and I want to create the tables in
Creating a class at runtime is done as follows: klass = Class.new superclass, &block
At runtime I am creating a WPF control . It can be any WPF
I'm creating button dynamically at runtime which their click event opens a datepickerdialog. So
I'm creating a GroupBox at runtime and setting its Text property. Usually, the text

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.