Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can I pass binary data of a file to WebBrowser control? Pin
Luc Pattyn10-Jun-10 7:40
sitebuilderLuc Pattyn10-Jun-10 7:40 
GeneralRe: Can I pass binary data of a file to WebBrowser control? Pin
Luc Pattyn10-Jun-10 8:18
sitebuilderLuc Pattyn10-Jun-10 8:18 
GeneralRe: Can I pass binary data of a file to WebBrowser control? Pin
Hristo-Bojilov10-Jun-10 10:51
Hristo-Bojilov10-Jun-10 10:51 
GeneralRe: Can I pass binary data of a file to WebBrowser control? Pin
Luc Pattyn10-Jun-10 10:55
sitebuilderLuc Pattyn10-Jun-10 10:55 
GeneralRe: Can I pass binary data of a file to WebBrowser control? Pin
Hristo-Bojilov10-Jun-10 11:11
Hristo-Bojilov10-Jun-10 11:11 
GeneralRe: Can I pass binary data of a file to WebBrowser control? Pin
Luc Pattyn10-Jun-10 14:30
sitebuilderLuc Pattyn10-Jun-10 14:30 
AnswerRe: Can I pass binary data of a file to WebBrowser control? Pin
Luc Pattyn10-Jun-10 8:19
sitebuilderLuc Pattyn10-Jun-10 8:19 
GeneralRe: Can I pass binary data of a file to WebBrowser control? Pin
AspDotNetDev10-Jun-10 13:52
protectorAspDotNetDev10-Jun-10 13:52 
Hi Luc,

I think you and the OP are miscommunicating. Let me see if I can help to clear things up. Say you want to display a PDF in a WebBrowser control. You'd have to 1) have some HTML that makes uses of <embed> to point to a PDF and 2) have that embed tag point to some location that is storing the PDF. Now, if the application making use of the WebBrowser is entirely local, it would be impossible to, say, serve up a PDF file when a certain URL is hit (that would solve the problem of using a stream to serve a PDF, but only if the OP has access to a web server). Now, if the user wants to do everything on the client side without any file access or remote URL access, then it seems there may be a problem displaying the PDF. The OP is claiming that images can be directly displayed by a WebBrowser control (i.e., by passing the memory stream to the WebBrowser) but that the WebBrowser is incapable of displaying a PDF, except for via an <embed> tag. If you use the EMBED approach, you have to point to somewhere, and that somewhere can't be a memory stream.

By the way, the tip/trick you made doesn't work for me. I just see an "X" displayed where there should be an image. Not sure why that is. Perhaps the type of data needs to be specified somehow (usually this would be provided by the server in the HTTP header, but there is no HTTP header AFAIK when you set the WebBrowser control to use a memory stream).

GeneralRe: Can I pass binary data of a file to WebBrowser control? Pin
Luc Pattyn10-Jun-10 14:46
sitebuilderLuc Pattyn10-Jun-10 14:46 
QuestionProblems setting vertical scrollbar value in a datagrid (old one, not the better DataGridView). Pin
NitzanJ9-Jun-10 23:56
NitzanJ9-Jun-10 23:56 
QuestionHOW TO Install SQLSERVER32 at installation Pin
MayukhSen9-Jun-10 23:54
MayukhSen9-Jun-10 23:54 
QuestionC# Polymorphic object comparison Pin
Benny_Lava9-Jun-10 23:37
Benny_Lava9-Jun-10 23:37 
AnswerRe: C# Polymorphic object comparison Pin
Łukasz Nowakowski9-Jun-10 23:41
Łukasz Nowakowski9-Jun-10 23:41 
GeneralRe: C# Polymorphic object comparison Pin
Benny_Lava10-Jun-10 0:55
Benny_Lava10-Jun-10 0:55 
AnswerRe: C# Polymorphic object comparison Pin
OriginalGriff9-Jun-10 23:47
mveOriginalGriff9-Jun-10 23:47 
GeneralRe: C# Polymorphic object comparison Pin
Łukasz Nowakowski10-Jun-10 0:31
Łukasz Nowakowski10-Jun-10 0:31 
GeneralRe: C# Polymorphic object comparison Pin
Benny_Lava10-Jun-10 0:57
Benny_Lava10-Jun-10 0:57 
AnswerRe: C# Polymorphic object comparison Pin
LookSharp11-Jun-10 13:13
LookSharp11-Jun-10 13:13 
Questioncrystal reports and c# (report directly with parameters). Pin
Absoluto9-Jun-10 22:10
Absoluto9-Jun-10 22:10 
AnswerRe: crystal reports and c# (report directly with parameters). Pin
Adam R Harris10-Jun-10 5:52
Adam R Harris10-Jun-10 5:52 
QuestionIntelliSense bug in VS2005 Pin
Mc_Topaz9-Jun-10 21:54
Mc_Topaz9-Jun-10 21:54 
AnswerRe: IntelliSense bug in VS2005 Pin
#realJSOP10-Jun-10 4:29
mve#realJSOP10-Jun-10 4:29 
GeneralRe: IntelliSense bug in VS2005 Pin
Mc_Topaz10-Jun-10 4:38
Mc_Topaz10-Jun-10 4:38 
GeneralRe: IntelliSense bug in VS2005 Pin
dybs12-Jun-10 10:19
dybs12-Jun-10 10:19 
Question.net framework 4 Pin
michaelgr19-Jun-10 20:46
michaelgr19-Jun-10 20:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.