Results 1 to 2 of 2

Thread: load string int text box from txt file ? any one know ? please help

  1. #1
    New Member
    Join Date
    Jul 12
    Posts
    3

    load string int text box from txt file ? any one know ? please help

    Hi

    i would like to load text box from txt file .

    do you know solution to do it ?

    I already created the button ( for loading and have text box) how can i do this ? lets say i have inside txt file .

    name
    secondname

    how can i load it inside text box little program?

  2. #2
    Fanatic Member AceInfinity's Avatar
    Join Date
    May 11
    Posts
    605

    Re: load string int text box from txt file ? any one know ? please help

    I'm assuming by the title you meant "Load string into text box from text file..."

    This is pretty simple, you want this in a textbox, but I see multiple lines here, so i'm assuming multiline is set to true.

    Note:
    Code:
    using System.IO;
    Code:
    textBox1.Text = File.ReadAllText("FilePathGoesHere");
    Or... just:
    Code:
    textBox1.Text = System.IO.File.ReadAllText("FilePathGoesHere");
    <<<------------
    < Please rate my post if this helped you out. Any kind of thanks is gladly appreciated >



    VB Programming (2012 - Present)
    ®Crestron - DMC-T Certified Programmer | Software Developer
    <<<------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •