c# - Open document with word, without path -


i'm searching how open document word, without path.

i document :

byte[] text = item.doc; 

the document comes directly database.

i found way open path... doc, must open it, , run saveas of word application (choice between pdf, doc etc...).

i can store in memorystream, but, can next?

found how open file memory stream, not helping me.

try this

    response.clear();     response.buffer = true;     response.contenttype = "application/ms-word";     string filename = "test.doc";     response.addheader("content-disposition", "attachment; filename=" + filename);     streamreader reader = new streamreader(memorystream, system.text.encoding.utf8, true);     string  strcontents = reader.readtoend();     reader.close();     response.write(strcontents);     response.end(); 

--sj


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -