Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Loading controls dynamically

Loading controls dynamically

Scheduled Pinned Locked Moved ASP.NET
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    padvit
    wrote on last edited by
    #1

    I would like to know is it possible to load controls dynamically other than in pageload. I tried the same the dynamically created controls are not behaving properly. They are sometimes visible and not visible. The events get triggered abnormally. Padvit

    M 1 Reply Last reply
    0
    • P padvit

      I would like to know is it possible to load controls dynamically other than in pageload. I tried the same the dynamically created controls are not behaving properly. They are sometimes visible and not visible. The events get triggered abnormally. Padvit

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      Hi there, IMO, the reason your dynamically added controls do not run properly is that you don't reinsert them in the right place. Basically, your dynamic controls need to be added every time the page is loaded and they should be reinserted previous to loading of the view state and reloading of postback data, otherwise the postback events of the controls don't run properly. For more information, you can see Control Execution Lifecycle[^] You may also find this article[^] (Scott Mitchell) as a very good example of working with dynamic controls.

      P 1 Reply Last reply
      0
      • M minhpc_bk

        Hi there, IMO, the reason your dynamically added controls do not run properly is that you don't reinsert them in the right place. Basically, your dynamic controls need to be added every time the page is loaded and they should be reinserted previous to loading of the view state and reloading of postback data, otherwise the postback events of the controls don't run properly. For more information, you can see Control Execution Lifecycle[^] You may also find this article[^] (Scott Mitchell) as a very good example of working with dynamic controls.

        P Offline
        P Offline
        padvit
        wrote on last edited by
        #3

        Hi thank you once again. The information is very useful. I find always answers for all of my question from you thats really great. Can you give me introduction of your self just interested to know about you. Padvit

        M 1 Reply Last reply
        0
        • P padvit

          Hi thank you once again. The information is very useful. I find always answers for all of my question from you thats really great. Can you give me introduction of your self just interested to know about you. Padvit

          M Offline
          M Offline
          minhpc_bk
          wrote on last edited by
          #4

          Hi there, I'm glad to hear my posts are helpful to you , I'm a crazy CPian and fan of ManUtd in VietNam :) Minh

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups