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 6649103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:44:04+00:00 2026-05-26T00:44:04+00:00

i want open a text,where i already type many strings and in after all

  • 0

i want open a text,where i already type many strings and in after all that rows
i want to create a new row and write the information in.all the informations
about the new line i want to write i take it from textboxes

//button open file
private void button4_Click(object sender, EventArgs e)
    {
        if(openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {

            label7.Text = openFileDialog1.FileName;
            textBox7.Text = File.ReadAllText(label7.Text);
        }
    }


    //button save file
    private void button5_Click(object sender, EventArgs e)
    {
        if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {

            File.WriteAllText(saveFileDialog1.FileName, textBox7.Text);
        }

    }

      //this is the add button
    private void button1_Click(object sender, EventArgs e)
       {

        string inValue1, inValue2, inValue3, inValue4, inValue5, inValue6;
        inValue1 = textBox1.Text;
        inValue2 = textBox2.Text;
        inValue3 = textBox3.Text;
        inValue4 = textBox4.Text;
        inValue5 = textBox5.Text;
        inValue6 = textBox6.Text;


        string result = (inValue1 + "," + inValue2 + "," + inValue3 + ","
            +inValue4+ "," +inValue5 + "," +inValue6);
        //File.WriteAllText("C:\\text.txt", textBox1.Text);
        System.IO.File.WriteAllText(@"C:\Users\v\Desktop\text.txt", result);
    }
  • 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-26T00:44:05+00:00Added an answer on May 26, 2026 at 12:44 am

    It’s not entirely clear what you mean, but I suspect you just want File.AppendAllText:

    File.AppendAllText(filename, "new line of text");
    

    Or possibly, if the file doesn’t end with a line break at the moment:

    File.AppendAllText(filename, Environment.NewLine + "new line of text");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In an already open word document select all text copy selected text to clipboard
I want to make the descriptive text around a form link also open the
I want to write an text editor and to assign the txt files to
I want to open a text file (see below), read the first int in
I want to write some stats to a text file every time a person
I have some unicode text that I want to clean up using regular expressions.
I already wrote here about the http chat server I want to create: Alternative
I want to open a partial view as a JQuery dialog that when I
I want to add text to a jpg creating a new image. There will
I need to open a file to write some text to it, is there

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.