How I can open the image saved in database directly using Internet Explorer (Not WebBrowser control in WinForm/WPF) without saving it to a file first?
Asked
Active
Viewed 407 times
0
-
1You have tagged this question to C#, where is C# involved here? Is it that you want a code in C# to get the image from DB and display it in a Web Browser? – Arif Eqbal Apr 19 '12 at 05:33
-
Yes, the code I needed is in C#. I can get the image from database in byte[] format but I don't know how to display it using Internet Explorer, not the "WebBrowser" control. Thanks. – user1342669 Apr 19 '12 at 05:41
-
possible duplicate of [Dynamically Rendering asp:Image from BLOB entry in ASP.NET](http://stackoverflow.com/questions/21877/dynamically-rendering-aspimage-from-blob-entry-in-asp-net) – Kirk Broadhurst Apr 19 '12 at 06:35
-
Is it ASP.Net or WinForm/WPF?? – Arif Eqbal Apr 19 '12 at 07:43
2 Answers
1
I think this is not possible unless you create a web page or something similar to display the image from a temp file

Danny Dyla
- 631
- 4
- 15
-
Not true, you just need a handler which returns the byte[] with correct content type. http://stackoverflow.com/questions/21877/dynamically-rendering-aspimage-from-blob-entry-in-asp-net – Kirk Broadhurst Apr 19 '12 at 06:36
0
Search for Process.Start look at the site... MSDN
This gives you the exact example of opening a file in IE, you might need to save your image into a temp file on the disk

Arif Eqbal
- 3,068
- 1
- 18
- 10