Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 313659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:07:42+00:00 2026-05-12T08:07:42+00:00

I have 4 textboxes and I have to write what’s contained in there to

  • 0

I have 4 textboxes and I have to write what’s contained in there to a textfile I’ll randomly generate. How will I write textbox data to the text file? and exactly where in the code? If i do it in :

private void textBox1_TextChanged(object sender, EventArgs e)

and have it all in the boxes textchanged parts, I can only get one textbox written.

Also how will I generate a txt file, that I’ll randomly name with a 5 lettered name?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:07:42+00:00Added an answer on May 12, 2026 at 8:07 am
    StreamWriter writeFile = new StreamWriter(fileLocation);
    writeFile.WriteLine(textBox1.Text);
    writeFile.WriteLine(textBox2.Text);
    //etc.
    
    writeFile.Close();
    

    It depends what your aim is, as to when to save the file. If you want to save every time a text box text is changed, hook them all up to that event.

    Althought if otherwise you could do it on a button click (save button?).

    You will need to give more details for a more appropriate answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 7 textboxes. If Top 1 textbox( Volume All Years ) text changed,
Lets say we have a textbox and an button. And the user write table
I have a multi-threaded application in C# which tries to write to a TextBox
I have Textbox with blue Background and white Foreground . When entering a text
I have several textboxes in my aspx file (not nested in any other controls),
I have 25 textboxes. I have one button that will paste information in a
I have 2 textboxes and If I write anythng in textbox1 it should reflect
I have two textboxes tbxProdAc and txtbxHowMany . I would like to write a
I have to write a program (C#, WPF), where data is retrieved from ~30
My data is being correctly loaded on my page. However I have 2 textboxes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.