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. Programmatically adding usercontrols

Programmatically adding usercontrols

Scheduled Pinned Locked Moved ASP.NET
helptutorialquestion
3 Posts 3 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.
  • T Offline
    T Offline
    threemp3
    wrote on last edited by
    #1

    Hi guys Does anyone know how to programmatically add multiple usercontrols to a panel? I've used LoadControl() method, but it only loads the usercontrol the first time. I wantt to continually add multiple usercontrols to the same panel. Can anyone help me? Thanks

    P S 2 Replies Last reply
    0
    • T threemp3

      Hi guys Does anyone know how to programmatically add multiple usercontrols to a panel? I've used LoadControl() method, but it only loads the usercontrol the first time. I wantt to continually add multiple usercontrols to the same panel. Can anyone help me? Thanks

      P Offline
      P Offline
      Phivos Stylianides
      wrote on last edited by
      #2

      Hi, in this case i am adding an array of LinkButtons in a Multiview control dynamically. entries[indexIntVar] = new LinkButton(); view1.Controls.Add(entries[indexIntVar]); Hope this helps!

      1 Reply Last reply
      0
      • T threemp3

        Hi guys Does anyone know how to programmatically add multiple usercontrols to a panel? I've used LoadControl() method, but it only loads the usercontrol the first time. I wantt to continually add multiple usercontrols to the same panel. Can anyone help me? Thanks

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        You can add n number of user control Dynamically But why are you adding user controls to Panel ? There is one more simpler option you can add user controls to Repeater Use Repeater instead of Panel if you can that will make your life simpler

        Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

        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