R
Rock2000
I have an app where we turn the AddExtension property of the SaveFileDialog
to true because I always want the extension returned as part of the filename.
But when users start entering filename that would result in multiple dots
(test.a resulting in test.a.mdb) I'm seeing different behaviors on different
systems, with no reasoning that I can see.
On one system, entereing test.a returns test.a instead of test.a.mdb. On my
system test.a returns test.a.mdb, but test.s return test.s. What the heck is
going on here?!? I tried enabling the SupportMultiDottedExtensions option,
but that had no effect.
Thanks. Here's the basic code.
SaveFileDialog save = new SaveFileDialog();
save.CheckPathExists = true;
save.OverwritePrompt = true;
save.AddExtension = true;
save.SupportMultiDottedExtensions = true;
save.DefaultExt = "mdb";
save.Filter = string.Format("{0} (*.mdb)|*.mdb", "Submodel Files");
save.Title = "Select Submodel File to Export";
DialogResult retVal = save.ShowDialog(null);
if(retVal == DialogResult.OK)
MessageBox.Show(save.FileName);
to true because I always want the extension returned as part of the filename.
But when users start entering filename that would result in multiple dots
(test.a resulting in test.a.mdb) I'm seeing different behaviors on different
systems, with no reasoning that I can see.
On one system, entereing test.a returns test.a instead of test.a.mdb. On my
system test.a returns test.a.mdb, but test.s return test.s. What the heck is
going on here?!? I tried enabling the SupportMultiDottedExtensions option,
but that had no effect.
Thanks. Here's the basic code.
SaveFileDialog save = new SaveFileDialog();
save.CheckPathExists = true;
save.OverwritePrompt = true;
save.AddExtension = true;
save.SupportMultiDottedExtensions = true;
save.DefaultExt = "mdb";
save.Filter = string.Format("{0} (*.mdb)|*.mdb", "Submodel Files");
save.Title = "Select Submodel File to Export";
DialogResult retVal = save.ShowDialog(null);
if(retVal == DialogResult.OK)
MessageBox.Show(save.FileName);