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. Control Persistence

Control Persistence

Scheduled Pinned Locked Moved ASP.NET
questionannouncementcsharpasp-netwinforms
2 Posts 1 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.
  • B Offline
    B Offline
    badgrs
    wrote on last edited by
    #1

    Hi, I'm trying to implement something similar to this article using the release version of ASP.NET AJAX Extensions and plain old .NET 2.0. I have a UserControl called Dashboard.ascx which contains several Panel controls. Dashboard overrides the CreateChildControls method and on the first page load (using ScriptManager.GetCurrent(Page).IsInAsyncPostBack) it populates each Panel with user controls of type WidgetContainer. This works fine and everything gets rendered as expected. WidgetContainer contains two UpdatePanels and when a child control (in this case a LinkButton) causes an async post back the reponse doesn't contain the contents of the UpdatePanel and on the next click all the WidgetContainers dissapear. So my question is, how are controls added programatically persisted accross post backs? I assumed the ControlCollection class would handle this but apparently not as all the controls I add are getting removed. Any suggestions? Cheers

    B 1 Reply Last reply
    0
    • B badgrs

      Hi, I'm trying to implement something similar to this article using the release version of ASP.NET AJAX Extensions and plain old .NET 2.0. I have a UserControl called Dashboard.ascx which contains several Panel controls. Dashboard overrides the CreateChildControls method and on the first page load (using ScriptManager.GetCurrent(Page).IsInAsyncPostBack) it populates each Panel with user controls of type WidgetContainer. This works fine and everything gets rendered as expected. WidgetContainer contains two UpdatePanels and when a child control (in this case a LinkButton) causes an async post back the reponse doesn't contain the contents of the UpdatePanel and on the next click all the WidgetContainers dissapear. So my question is, how are controls added programatically persisted accross post backs? I assumed the ControlCollection class would handle this but apparently not as all the controls I add are getting removed. Any suggestions? Cheers

      B Offline
      B Offline
      badgrs
      wrote on last edited by
      #2

      A victim of my own frustration: a quick google search turned up numerous articles discussing this.

      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