I am trying to present to the user a textbox that will contain a filename, complete with path, that is derived by providing a lookup to where you want this file to go. The textbox is called txtFileName.
I am trying to follow the example in the code provided below but even though I have included the System.Windows.Forms namespace it does not recognize saveFileDialog1 all I get is saveFileDialog and there is no Filter directive. What am I mssing?
private void btnSave_Click(object sender, EventArgs e)
saveFileDialog1.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*";
saveFileDialog1.FilterIndex = 1;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
StreamWriter myStream = new StreamWriter(saveFileDialog1.FileName, true);