Niclas

Niclas

  • NA
  • 1
  • 0

File Dialog in web

Dec 18 2007 10:18 AM

I'm writing a file to the disk by using the StreamWriter:

StreamWriter sw = new StreamWriter("bigFile.txt");

sw.Write(myXmlNode.OuterXml);

I do this in a code behind (.aspx.cs) page. The file is close to 7Mb big. Instead of (or if that's not possible: in addition to) saving the file ot the disk, I want the user to get a file dialog so that he can save the file to his own disk instead of the server's disk. To clarify: since I'm using web and not for instance windows forms, I can't use the System.Windows.Forms classes (like FileDialog).

It seems like a pretty basic thing to do. Something that thousands of people have already done. So... Ideas?


Answers (1)