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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Best way to generate and wire-up events for dynamic controls?

Best way to generate and wire-up events for dynamic controls?

Scheduled Pinned Locked Moved ASP.NET
questionjavascriptxmlhelptutorial
1 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.
  • R Offline
    R Offline
    Red_Wizard_Shot_The_Food
    wrote on last edited by
    #1

    I've had a quick search of the forums but no posts seem to cover my question. Unlike the other posts on dynamic controls: my controls render fine, they respond to events that I've wired them up to.... It's just I'm looking for a technique that is more dynamic and elegant for wiring the events up. For example: I have one page that dynamically changes it's contents depending on the url used to navigate to it (An HttpHandlerFactory helps do this for me) So the content generator on PageContent.aspx could be pointed at, say, 20 different XML sources and thus render 20 totally different pages... the problem with my current method is that it requires all the events for those 2 pages to be defined and wired up in one place.... Which makes the page code behind very cluttered with all the possible events. Is there any way to do this in a more elegant fashion? say, for example: * Store all the events for one possible page layout in another file?? * Access a class containing all the possible events via dynamic Javascript on the page that makes calls that are handled by an HttpHandler?? * Or any other way? Cheers,

    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