Click here to Skip to main content
15,566,615 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All

Here i have prob, i dont know how to convert this and how to pass to imageurl

my code

byte[] imageBytes = Convert.FromBase64String(Dtab.Rows[0]["photo"].ToString());
            using (var imageStream = new MemoryStream(imageBytes, false))
                Bitmap image = new Bitmap(imageStream);

i want to show image from this how to make easily

AND when i am using namespace for bitmap(system.drawing) and already using(ul.control) it clashing and give error

Bitmap image = new Bitmap(imageStream);
Image i=(Image)image;

thank You !
Updated 16-Aug-14 3:05am

1 solution

Maybe you're a little bit confused, because a Bitmap is actually an image, it inherits from the Image class.

This is the declaration of the Bitmap class (From MSDN documentation about the Bitmap)

public sealed class Bitmap : Image[^]

It would be prefered if you would show the actual error that you're getting from the Compiler (or IntelliSense if you're using Visual Studio).
Share this answer
prasanna.raj 16-Aug-14 8:34am    
k but when i use "using System.Web.UI.WebControls" bitmap not supported ,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900