Why is my C# generated html file being saved?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GoldenShiner
    New Member
    • Mar 2010
    • 4

    Why is my C# generated html file being saved?

    Hello,
    I am writing to an Html file using C#. but I dont want that file saved. I just want the user to see it, and then when they close it, to dissappear. Why is this html file still being saved on my desktop?? The C# code is behind my infopath form. any help is appreciated.
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Code?
    You're probably writing to a FileStream type object, whereas you want just a different stream. Maybe BufferedInputSt ream or BufferedOutputS tream depending on what you're doing.

    Comment

    • GoldenShiner
      New Member
      • Mar 2010
      • 4

      #3
      Thank you for your quick reply. yes, I am using Filestream
      outputfile = new FileStream(file Name,FileMode.C reate,FileAcces s.Write);
      writer = new StreamWriter(ou tputfile);
      writer.BaseStre am.Seek(0, SeekOrigin.End) ;

      is BufferedOutputS tream part of C#? or Java?
      I tried to use BufferedStream, do I just use BufferedStream instead of FileStream? or how exactly? thanks again for your help.

      Comment

      Working...