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. how manage the event hanlder of dynamically created checkbox list

how manage the event hanlder of dynamically created checkbox list

Scheduled Pinned Locked Moved ASP.NET
help
4 Posts 4 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.
  • S Offline
    S Offline
    Shaista Shafiq
    wrote on last edited by
    #1

    hi i have to create the checkbox list dynamically and add the selectedindexchanged event handler and against that checked change new checkboxlist will be created but i could not handle the event handler properly if anyone can help

    C M 2 Replies Last reply
    0
    • S Shaista Shafiq

      hi i have to create the checkbox list dynamically and add the selectedindexchanged event handler and against that checked change new checkboxlist will be created but i could not handle the event handler properly if anyone can help

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can't, if you create a control dynamiclaly, unless you do it before page load, there will be no viewstate. Instead, you can check through the form data posted back for the id's of checkboxes that were checked.

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      1 Reply Last reply
      0
      • S Shaista Shafiq

        hi i have to create the checkbox list dynamically and add the selectedindexchanged event handler and against that checked change new checkboxlist will be created but i could not handle the event handler properly if anyone can help

        M Offline
        M Offline
        metallica_rock10
        wrote on last edited by
        #3

        try this name_of_your_checkbox.CheckedChanged+=new EventHandler(name_of_your_function);

        ASP.NET

        A 1 Reply Last reply
        0
        • M metallica_rock10

          try this name_of_your_checkbox.CheckedChanged+=new EventHandler(name_of_your_function);

          ASP.NET

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          As Christian suggest , he has to do this before page load !!!

          cheers, Abhijit Think Sharp | Code Sharp | C Sharp

          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