2
Answers

Rewriting windows c# code to asp net c#

Mani Kandan

Mani Kandan

8y
281
1
Sir,
 
How to write this windows code to asp.net webform using c#? 
 
using (SaveFileDialog saveDialog = new SaveFileDialog())
{
saveDialog.Filter = "Word document (*.docx)|*.docx";
saveDialog.InitialDirectory = Environment.CurrentDirectory;
saveDialog.RestoreDirectory = true;
saveDialog.DefaultExt = "docx";
if (saveDialog.ShowDialog() == DialogResult.OK)
{
FileStream fs = File.Create(saveDialog.FileName);
tbxFile.Text = saveDialog.FileName;
this.btnCreateChart.Enabled = true;
fs.Close();
}
}
Answers (2)