Click here to Skip to main content
16,017,745 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have use five text box in my design page if i enter value in text box that all will store in particular notepad file with (,).how is it dears?
Posted
Comments
Rajesh Anuhya 27-Jun-13 7:18am    
No Effort, where do you want to save? server or client?

1 solution

C#
string textBoxesValues = "TextBox1.Text" + "," + "TextBox2.Text" + "," + "TextBox3.Text" + "," + "TextBox4.Text" + "," + "TextBox5.Text";
            StreamWriter writer = new StreamWriter("FilePath where you want to save e.g D:\\New Folder\abc.text", true);    //true if you want to append text
            writer.WriteLine(textBoxesValues);
            writer.Flush();
            writer.Close();
            writer.Dispose();
            //or try this
            File.AppendAllText("FilePath where you want to save e.g D:\\New Folder\abc.text", textBoxesValues);


Helping Link

MSDN LINK
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900