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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:44:07+00:00 2026-06-04T00:44:07+00:00

My issue is the page posts back but does not call the method. Here

  • 0

My issue is the page posts back but does not call the method.

Here is where I create the link Buttons inside the RenderProducts method

for (var counter = 1; counter <= numberOfPages; counter++)
        {

            var pagingLink = new LinkButton
                                 {
                                     Text = " " + counter.ToString(CultureInfo.InvariantCulture) + " ",
                                     ID = "page" + counter
                                 };
            pagingLink.Attributes["runAt"] = "server";
            pagingLink.Attributes["class"] = "paging-link";
            pagingLink.Attributes.Add("AutoPostBack", "true");
            pagingLink.Attributes.Add("AutoEventWireup", "true"); 
            pagingLink.Click +=ChangePage;

            paging.Controls.Add(pagingLink);
        }

The method it is calling

        public void ChangePage(object sender, EventArgs args)
    {
        // handle this particular case
        RenderProducts(2);
    }

For completeness below you will see on PostBack I prevent it’s default action

 protected void Page_Load(object sender, EventArgs e)
    {
        GetSideBar();
        BuildRefineSearch();
        PopulateList();
        PerformSearch();
        if(!IsPostBack )
        {
            RenderProducts(1);
        }


    }
  • 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-04T00:44:08+00:00Added an answer on June 4, 2026 at 12:44 am

    I moved everything to the
    override protected void OnInit(EventArgs e)

    as this was a user control this solved my issue.

    Thanks to Chandermani for getting me to think about when my event was firing.

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

Sidebar

Related Questions

Here's a page with the issue To reproduce the error, using IE - click
I am having an issue embedding my report into an aspx page. Here's my
UPDATE: RESPONSE FOUND AT: http://community.invisionpower.com/tracker/issue-21634-md5-once-password-does-not-decode-html-entities/ I want to make a separated page using my
I'm getting the error as outlined here http://blog4umbraco.codeplex.com/workitem/5399 . The page says the issue
I want to implement Full Page Cache, but currently I have 1 issue to
Here my situation : The user click on a LinkButton, and the page does
I realize I am probably doing this completely wrong, but here is my issue...
I am have an issue with the page reloading. I have written a simple
Issue is SOLVED: Problem is that it is a pre-compiled web page project and
I'm having an issue on my instance page life expectancy would drop to a

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.