asp.net - How to disable download pop up in browser from c# .Net -


i have added pdf download application. when click on download, browser asking whether save or open pdf document. need set open default not prompt next time.

here code:

response.contenttype = "application/pdf"; response.appendheader("content-disposition","attachment; filename=" + "report.pdf"); response.transmitfile(pdffilename); 

hope u. convert attach file buffer firstly..

        byte[] buffer = client.downloaddata(path);          if (buffer != null)         {             response.contenttype = "application/pdf";             response.addheader("content-length", buffer.length.tostring());             response.binarywrite(buffer);         } 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -