How to code save button? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to code save button?

I m writing program that saves searches updates data I need help

7th Nov 2016, 5:46 PM
Khan Samar
Khan Samar - avatar
2 Answers
+ 4
hmm... You gonna need to store data into an external file. Then on load read that file again.
8th Nov 2016, 2:08 AM
Alireza M
Alireza M - avatar
0
You can create a text file,and store data in.Using StreamWriter you can do it,or use SaveFileDialog. //streamwriter StreamWriter sr = new StreamWriter("file save path"); sr.Write(richTextBox1.Text); sr.Close(); //or use savefiledialog SaveFileDialog sv = new SaveFileDialog(); if(sv.ShowDialog()==Dialog.Result) { richTextBox1.SaveFile("file save path"); }
7th Jun 2018, 4:08 PM
Byte
Byte - avatar