How to Display PDF in Browser ?
-
I have a list of PDF files which are uploaded into the database. Now on way back I recieve bytes which I Flush to browser but it ether ask for open or save option or it display nothing. Please help in any VB.Net or C# . My Code is response.clear response.contenttype="application/pdf" response.flush //tried either of below but both doesnt work response.writebytes (myFileBytes) // OR after writing a file from bytes response.writefile(Filepath) Response.end Any help or suggestion ? Regards
-
I have a list of PDF files which are uploaded into the database. Now on way back I recieve bytes which I Flush to browser but it ether ask for open or save option or it display nothing. Please help in any VB.Net or C# . My Code is response.clear response.contenttype="application/pdf" response.flush //tried either of below but both doesnt work response.writebytes (myFileBytes) // OR after writing a file from bytes response.writefile(Filepath) Response.end Any help or suggestion ? Regards
Rizwan Bashir wrote:
but both doesnt work
Meaning?
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
Rizwan Bashir wrote:
but both doesnt work
Meaning?
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
I have a list of PDF files which are uploaded into the database. Now on way back I recieve bytes which I Flush to browser but it ether ask for open or save option or it display nothing. Please help in any VB.Net or C# . My Code is response.clear response.contenttype="application/pdf" response.flush //tried either of below but both doesnt work response.writebytes (myFileBytes) // OR after writing a file from bytes response.writefile(Filepath) Response.end Any help or suggestion ? Regards
If write file doesn't work, then you have serious issues. What's actually happening ? Try losing the clear and flush calls, you don't need them.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
If write file doesn't work, then you have serious issues. What's actually happening ? Try losing the clear and flush calls, you don't need them.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
I can't imagine why it wouldn't work, although I would use Response.BinaryWrite. Try that.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
I can't imagine why it wouldn't work, although I would use Response.BinaryWrite. Try that.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )