Click here to Skip to main content
15,065,044 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

C#
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
Like

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

thank You !
Posted
Updated 16-Aug-14 2:05am
v2

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)

C#
[SerializableAttribute]
[ComVisibleAttribute(true)]
public sealed class Bitmap : Image


http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx[^]

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).
   
v2
Comments
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