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