The following is the current code for the export button on my app;
I'm at a loss as to how I make it select the content of the combo box (cboClient) and the three text boxes (txtBackup, txtAV, txtOther) to export them to the .txt file.
Ideally what I'd like to see in the .txt file is;
<Client>: <txtBackupconte nt> <txtAVcontent > <txtOtherconten t>
However, I'm stuck as to how to do that.
Any help would be greatly appreciated.
Code:
private void btnExport_Click(object sender, EventArgs e)
{
string filename;
filename = DateTime.Now.Date.ToShortDateString();
filename = filename.Replace("/", "-");
filename += ".txt";
TextWriter writer;
if (File.Exists(filename))
{
writer = File.AppendText(filename);
}
else
{
writer = File.CreateText(filename);
}
}
Ideally what I'd like to see in the .txt file is;
<Client>: <txtBackupconte nt> <txtAVcontent > <txtOtherconten t>
However, I'm stuck as to how to do that.
Any help would be greatly appreciated.