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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:35:43+00:00 2026-05-25T14:35:43+00:00

On our ASP.Net 4.0 C# web app I get the error above in the

  • 0

On our ASP.Net 4.0 C# web app I get the error above in the subject line during debug.

I’m not really doing anything funky with dynamic controls on the page as some search results indicated could have been the source of the problem.

The page has 2 ajax:CalendarExtenders and has been working fine for a while.

Although its probably related, I can see how really but this is what I was currently working on when the error came up.

We have a control on the page that raises an event on an autorefresh feature. [Its a map control].

My page subscribes to that event and upon doing so DataBinds an asp:GridView. We need to bind the data in the grid every time to ensure the grid and the map control are in sync. [Its a vehicle tracking page]

The error occurs on the DataBind command.

I have removed the Extenders only to come up with the same error.

The databind is straightforward but I’m sure the error resides elsewhere. I’ll include it anyway.

this.SearchGrid.DataSource = resultsWithMetrics;

        this.SearchGrid.AllowPaging = true;
        this.SearchGrid.PageIndex = this.SearchGridPager.CurrentPage;
        this.SearchGrid.AllowPaging = this.SearchGridPager.PageSize > 0;
        this.SearchGrid.PageSize = this.SearchGridPager.PageSize > 0 ? this.SearchGridPager.PageSize : this.SearchGrid.PageSize;

        this.SearchGrid.DataBind();

Maybe its simply not understanding the page life cycle that has tripped me up, anyway would be glad of some help.

  • 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-25T14:35:44+00:00Added an answer on May 25, 2026 at 2:35 pm

    Use the following code in your usercontrol or page control. It will work if you are using any ajax control.

    protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (this.DesignMode == true)
            {
                this.EnsureChildControls();
            }
            this.Page.RegisterRequiresControlState(this);
        } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We need to increase our knowledge on deployment of ASP.NET Web sites/Web App. We
My team is considering building our next web app using the ASP.NET MVC framework.
Our company has a fairly large ASP.NET web application. The app is already broken
We've implemented a background service in our Asp.Net web app that receives messages from
Our asp.net app is running on 10 web servers, after we deployed the new
I have been asked to migrate some code to our new asp.net web app.
We've got a page in our asp.net web system that uses response.redirect to redirect
we are currently implementing logging functionality with Log4net into our ASP.NET web-services. Therefore we
We want to split our large asp.net mvc web application into multiple Visual Studio
Our team is developing a rather big ASP.NET web project which initially started in

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.