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. problem in creating runtime controls

problem in creating runtime controls

Scheduled Pinned Locked Moved ASP.NET
helpquestion
6 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
    sweetrooni
    wrote on last edited by
    #1

    i want to have textboxes in a panel dynamically for each selected item in listbox to enter the corresponding value..what sould i do?

    G A 3 Replies Last reply
    0
    • S sweetrooni

      i want to have textboxes in a panel dynamically for each selected item in listbox to enter the corresponding value..what sould i do?

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      There are basically two ways of showing controls dynamically: :: Put all the controls that you need on the page, and use the Visible property do decide which controls are rendered to the final page. :: Create controls in code behind and add to the page. As you already know all the possible combinations of controls that you need, I suggest the first method.

      --- single minded; short sighted; long gone;

      1 Reply Last reply
      0
      • S sweetrooni

        i want to have textboxes in a panel dynamically for each selected item in listbox to enter the corresponding value..what sould i do?

        A Offline
        A Offline
        A R Bhagirathi
        wrote on last edited by
        #3

        Hi To create controls in the pannel : set the parent property of the control to the pannell that you have created; eg TextBox txtNew = new TextBox(); panel1.Contains(txtNew); txtNew.Parent=panel1; hope this is helpful

        S 1 Reply Last reply
        0
        • A A R Bhagirathi

          Hi To create controls in the pannel : set the parent property of the control to the pannell that you have created; eg TextBox txtNew = new TextBox(); panel1.Contains(txtNew); txtNew.Parent=panel1; hope this is helpful

          S Offline
          S Offline
          sweetrooni
          wrote on last edited by
          #4

          no,it's not working parent property is readonly

          V 1 Reply Last reply
          0
          • S sweetrooni

            no,it's not working parent property is readonly

            V Offline
            V Offline
            Venkatesh Mookkan
            wrote on last edited by
            #5

            Try the below code.... Dim txt as New TextBox Panel1.Controls.Add(txt)

            Regards, Venkatesh Mookkan. Software Engineer, India My: Website | Yahoo Group

            1 Reply Last reply
            0
            • S sweetrooni

              i want to have textboxes in a panel dynamically for each selected item in listbox to enter the corresponding value..what sould i do?

              A Offline
              A Offline
              A R Bhagirathi
              wrote on last edited by
              #6

              hi i could set pranent property in windows application, failed in asp.net sorry did not check out ealier, right method panel1.controls.add

              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