copying the text in different textboxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • enliven60411
    New Member
    • Dec 2009
    • 10

    copying the text in different textboxes

    I have five text boxes. In the first text boxes I put the user first and last name. In the second is the address and in the third is the city and in the fourth is the state and in the last one is the zip. I would like to know how to copy the information in the text boxes and put on another record with the same information.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    I would like to know how to copy the information in the text boxes
    Textboxes have a .Text property that contains the text you see in the textbox. Set a variable to that

    string Temp = textBox1.Text;

    Comment

    • enliven60411
      New Member
      • Dec 2009
      • 10

      #3
      How do I do that? Will something like this work for visual basic.net

      String Temp = PayeeAddress.Te xt
      PayeeAddress.Pa ste()

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        string Temp = PayeeAdress.Tex t

        That's it. Temp now contains a copy of whatever text was in your PayeeAdress textbox.

        You can do with it what you like. Write it to a file. Put it in another textbox. Send it to a database.

        SecondTextBox.T ext = Temp

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          enliven60411, what do you mean when you say:
          I would like to know how to copy the information in the text boxes and put on another record with the same information.
          You copy the information in the TextBoxes by accessing their Text property as Tlhintoq has suggested.....

          I have no idea what you mean about "put on another record with the same information".

          Could you explain in more detail so that we can help you better?

          -Frinny

          Comment

          Working...