SaveFileDialog 无法显示在最前面
各位大哥:初学使用 + C#开发环境,在使用SaveFileDialog时SaveFileDialog窗口不显示在WEB页面的上面,需要最小化当先使用的WEB页面才能看到SaveFileDialog窗口,请问有何办法让SaveFileDialog窗口直接显示在使用SaveFileDialog的WEB业务上面,非常感谢您的不吝赐教!
protected void Button1_Click(object sender, EventArgs e)
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "Txt文件(*.txt)|*.txt|EXCEL文件(*.xls)|*.xls|所有文件(*.*)|*.*";
saveFileDialog1.FilterIndex=2;
saveFileDialog1.DefaultExt = "xls";
saveFileDialog1.AddExtension = true;
saveFileDialog1.RestoreDirectory=true;
saveFileDialog1.CreatePrompt = true;
saveFileDialog1.ShowDialog();
if ((saveFileDialog1.ShowDialog()) == DialogResult.OK)
{
if (saveFileDialog1.FileName != null)
{
fName = saveFileDialog1.FileName;
File fSaveAs = new File(fName);
isFileHaveName = true;
fSaveAs.WriteFile(richTextBox1.Text);
}
else
{
MessageBox.Show("显示报错信息", "标题错误提示", MessageBoxButtons.OK);
}
}
saveFileDialog1.Dispose();
saveFileDialog1 = null;
}