Abhilash J A

Abhilash J A

  • 535
  • 2.4k
  • 596.3k

Rewriting windows c# code to asp net c#

Jun 29 2016 2:56 AM
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)