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 4335320
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:39:12+00:00 2026-05-21T10:39:12+00:00

I have implemented the jQueryPagination plugin to allow easy paging of a repeater control.

  • 0

I have implemented the jQueryPagination plugin to allow easy paging of a repeater control. This is working fine, however on this page I have a user control that allows the user to search for a ticket number. When the button to search is clicked, the pagination goes away and I see all of the repeater information, as well as my returned search result.

When I click the link button my jQuery seems to be non-existant.

Code:

<div id="msgLinks" class="subtabs">
            <asp:TextBox runat="server"  ID="txtSearchTicket"></asp:TextBox>
            <asp:LinkButton ID="lbSearch" runat="server" Text="Search" CausesValidation="false"
                onclick="lbSearch_Click" />
 </div>

jQuery (works on page load)

$('#tblRecAct').paginateTable({
        rowsPerPage: 5,
        Title: ".h1RecentActivity"
    });
    $('#tblMSG').paginateTable({
        rowsPerPage: 2,
        Title: ".h1SubmittedMessages",
        pager: ".pager2",
        pageNumbers: ".pageNumbers2"

    });

I have even tried calling

$(".subtabs a").click(function () {
        alert("Clicked");
        $('#tblRecAct').paginateTable({
            rowsPerPage: 5,
            Title: ".h1RecentActivity"
        });
    });

but it still does not work. Any ideas?

EDIT
New Code per request:

Page –

public string _Js = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                rptRecentMessages.DataSource = CMS.Model.Profile.RecentMessages(0, "");
                rptRecentMessages.DataBind();
                _Js = "CreatePaging();";
                LoadStatusMessages();
            }
        }

User Control (holds the search button) –

rptRecentActivity.DataSource = CMS.Model.Profile.RecentActivity(20);
rptRecentActivity.DataBind();
_Js = "CreatePaging();";

Search Button Click –

protected void lbSearch_Click(object sender, EventArgs e)
        {
            string searchTerms = txtSearchTicket.Text;
            if (searchTerms == "")
                txtSearchTicket.Style.Add("border", "1px solid red");
            else
            {
                rptRecentMessages.DataSource = CMS.Model.Profile.RecentMessages(1, searchTerms);
                rptRecentMessages.DataBind();
                _Js = "CreatePaging();";
                LoadStatusMessages();
            }
        }

jQuery Code on the Page –

<script type="text/javascript">
    $(document).ready(function () {
        function CreatePaging(){
            $('#tblRecAct').paginateTable({
                rowsPerPage: 5,
                Title: ".h1RecentActivity"
            });
            $('#tblMSG').paginateTable({
                rowsPerPage: 2,
                Title: ".h1SubmittedMessages",
                pager: ".pager2",
                pageNumbers: ".pageNumbers2"

            });
        }

        $().ready(function(){
            <% =(this._Js) %>

        });

    });



</script>

When I am debugging and click on the search link now, I do not get a postback to a page_load and I am not sure why.

  • 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-21T10:39:13+00:00Added an answer on May 21, 2026 at 10:39 am

    Change the click to

    $(".subtabs a").click(function () {
        alert("Clicked");
        $('#tblRecAct').paginateTable({
            rowsPerPage: 5,
            Title: ".h1RecentActivity"
        });
        return false;
    });
    

    adding the code return false; will prevent the link from clicking but will run your jQuery code.

    EDIT

    Put your jQUery code into a function so that you can easily call it from your c#

    function CreatePaging(){
        $('#tblRecAct').paginateTable({
            rowsPerPage: 5,
            Title: ".h1RecentActivity"
        });
        $('#tblMSG').paginateTable({
            rowsPerPage: 2,
            Title: ".h1SubmittedMessages",
            pager: ".pager2",
            pageNumbers: ".pageNumbers2"
    
        });
    }
    
    $().ready(function(){
        <% =(this._Js) %>
    });
    

    Then in your code behind, have a public string variable called _Js and when you bind the Repeater, set _Js = "CreatePaging();";

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

Sidebar

Related Questions

I have implemented Solr search in one of my .net application. Everything working fine
I have implemented correctly bump's api, and added this code: - (void) configureBump {
I have implemented a table view with multiple threads. Currently when a user taps
I have implemented one matrix multiplication with boost::numeric::ublas::matrix (see my full, working boost code
I have implemented Facebook authentication on my website. I have asked for user permissions
I have implemented a JSF validator based on this example . How can I
I have implemented Twitter4J in my Android application and it's works fine. But after
I have implemented SSO authentication using the sourceforge spnego project . This is my
I have implemented a Single Sign on function using Janrain. It outputs this data
I have implemented quartz scheduler in my application. And its working upto a certain

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.