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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:39:47+00:00 2026-05-25T11:39:47+00:00

Here’s the situation: I have a variable number of dynamically created update panels on

  • 0

Here’s the situation: I have a variable number of dynamically created update panels on my page, so I thought I would write one method which handles all of the loading for each one.

My Updatepanel creation looks something like this:

 Dim newUpdp As New UpdatePanel
 newUpdatep.ChildrenAsTriggers = False
 newUpdatep.UpdateMode = UpdatePanelUpdateMode.Conditional
 newUpdatep.ID = Guid.NewGuid.ToString

 AddHandler newUpdatep.Load, AddressOf updatep_load_method
 updatep_Holder.ContentTemplateContainer.Controls.Add(newUpdp)
 updatep_Holder.Update()  

This creates the update panel and binds its load event to the method “updatep_load_method”. This method is called as soon as the Updatepanel is inserted into the holder. The method code is as follows:

Private Sub updp_load_method(sender As UpdatePanel, e As System.EventArgs)
   Dim div As New HtmlGenericControl("div")
   div.InnerText = Date.Time.Now.ToString
   sender.ContentTemplateContainer.Controls.Add(div)
   sender.Update()
End Sub

A little later on I want to update the panel, and refresh the time. So I use the javascript __doPostBack method. According to Dave Ward, the __doPostBack method follows the full page postback lifecycle, so I figured the load event of my Update panel would be fired and that “updatep_load_method” would be called by that particular update panel…

Although the partial postback occurs, and other update panel’s load events are called, my bound ones aren’t. So what’s happening here?

  • 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-25T11:39:48+00:00Added an answer on May 25, 2026 at 11:39 am

    You need to recreate dynamic controls during Page_Init and have to use the same Id (so you cannot do a Guid.NewGuid.ToString() while recreating the control).

    Otherwise, ASP.Net will not be able to locate your control and populate it with data from ViewState.

    Here’s a good article that explains more about dynamic controls.

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

Sidebar

Related Questions

Here we go again, the old argument still arises... Would we better have a
Here is my code (Say we have a single button on the page that
Here's the problem....I have three components...A Page that contains a User Control and a
Here's the situation, i want to have a user that can enter time on
Here is my problem...I have a page that loads a list of clients and
Here is my situation: I am using telerik with winform. I have a dataset
Here's a problem I ran into recently. I have attributes strings of the form
Here is the issue I am having: I have a large query that needs
Here's my scenario - I have an SSIS job that depends on another prior
Here's the basic setup: I have a thin bar at the top of 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.