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_Li nkClicked(objec t sender,
LinkLabelLinkCl ickedEventArgs e)
{
SaveFileDialog savDialog = new SaveFileDialog( );
savDialog.Filte r = "Test Point Files(*.xml)\"| *.xml";
savDialog.AddEx tension = true;
DialogResult result;
result =savDialog.Show Dialog();
string savFile = savDialog.FileN ame;
if (result == DialogResult.OK )
{
FlightDataManag er.FlightDataMa nagerClass.test PointPanelDataS et.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
"ad" wrote:
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