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. General Programming
  3. C#
  4. please clear this doubt

please clear this doubt

Scheduled Pinned Locked Moved C#
tutorial
8 Posts 6 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.
  • A Offline
    A Offline
    arul mozhi
    wrote on last edited by
    #1

    How to get multiple inputs in textbox at run time and how it will display output in listbox

    C OriginalGriffO E 3 Replies Last reply
    0
    • A arul mozhi

      How to get multiple inputs in textbox at run time and how it will display output in listbox

      C Offline
      C Offline
      Calla
      wrote on last edited by
      #2

      Could you please elaborate on what you mean by "get multiple inputs in textbox at run time".

      A 1 Reply Last reply
      0
      • C Calla

        Could you please elaborate on what you mean by "get multiple inputs in textbox at run time".

        A Offline
        A Offline
        arul mozhi
        wrote on last edited by
        #3

        i want to store multiple inputs at run time in the text box and displays the output in listbox...

        for this am using for loop to get multiple inputs and how can i store it???

        i placed two text boxes , one for getting name and other for age... am going to give multiple persons name and age and am going to display it in list box... what shall i do for this????

        C L B 3 Replies Last reply
        0
        • A arul mozhi

          i want to store multiple inputs at run time in the text box and displays the output in listbox...

          for this am using for loop to get multiple inputs and how can i store it???

          i placed two text boxes , one for getting name and other for age... am going to give multiple persons name and age and am going to display it in list box... what shall i do for this????

          C Offline
          C Offline
          Calla
          wrote on last edited by
          #4

          Still don't get what it is you want to achieve. You have two textboxes: one representing a name and the other represents age. You want to display the name and the age in a listbox - I assume this is not causing you any problems? You say you have a for-loop "to get multiple inputs". What do you mean by this? Perhaps you better post the code that doesn't work..

          1 Reply Last reply
          0
          • A arul mozhi

            How to get multiple inputs in textbox at run time and how it will display output in listbox

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #5

            Do not double post - either post this in QA or the forums - not both. Otherwise you duplicate work and annoy people.

            Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            1 Reply Last reply
            0
            • A arul mozhi

              i want to store multiple inputs at run time in the text box and displays the output in listbox...

              for this am using for loop to get multiple inputs and how can i store it???

              i placed two text boxes , one for getting name and other for age... am going to give multiple persons name and age and am going to display it in list box... what shall i do for this????

              L Offline
              L Offline
              lukeer
              wrote on last edited by
              #6

              Drop the loop. Use a Button instead. Label it "Add". On a user's click on your AddButton, copy the current values of your input fields to the ListBox. Then clear the input fields and set focus on the first one. That way, users can type in names and click on the AddButton as often as they want. If you want to restrict the number of rows added to the ListBox, then you can implement that in your AddButton_Click method, too.

              Ciao, luker

              1 Reply Last reply
              0
              • A arul mozhi

                i want to store multiple inputs at run time in the text box and displays the output in listbox...

                for this am using for loop to get multiple inputs and how can i store it???

                i placed two text boxes , one for getting name and other for age... am going to give multiple persons name and age and am going to display it in list box... what shall i do for this????

                B Offline
                B Offline
                BobJanova
                wrote on last edited by
                #7

                ... or use a grid view with two columns which will let you add and edit as many people as you like.

                1 Reply Last reply
                0
                • A arul mozhi

                  How to get multiple inputs in textbox at run time and how it will display output in listbox

                  E Offline
                  E Offline
                  Emmanuel Medina
                  wrote on last edited by
                  #8

                  The way I see it you have 3 options: use the "Add" button sugestion, the gridview one, or make the user input a separating character between values, so you can take the inputs, split the strings by that character and work with the results. I think the best one, for the average end user, would be the Add button, having more than 1 "value" in the textbox is not very efficient or comfortable.

                  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