How to use saveFileDialog

A

ad

Hi,
I want to use saveFileDialog to save a file (like c:\aa.zip) to another
place.
How can I assgin c:\aa.zip to saveFileDialog
 
G

Guest

Here is an example of some code we use to save some app files in xml format.
We only pull up and use xml to filter out any other files in the directory.

private void saveTPButton_LinkClicked(object sender,
LinkLabelLinkClickedEventArgs e)
{
SaveFileDialog savDialog = new SaveFileDialog();
savDialog.Filter = "Test Point Files(*.xml)\"|*.xml";
savDialog.AddExtension = true;
DialogResult result;
result =savDialog.ShowDialog();
string savFile = savDialog.FileName;

if (result == DialogResult.OK)
{
FlightDataManager.FlightDataManagerClass.testPointPanelDataSet.Write
Xml(savFile);
}
}

The user can navigate to any directory before they click Save, or you could
assign a directory in the savFile variable before doing the actual save.

HTH

WhiteWizard
aka Gandalf
MCSD.NET, MCAD, MCT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top