hi KaranGupta,
follow the below link.
http://forums.asp.net/t/57
Main Topics
Browse All TopicsI have an image in System.Drawing.Image control
How can I show it in
System.Web.UI.WebControls
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
hi KaranGupta,
follow the below link.
http://forums.asp.net/t/57
Hi abel
My requirement is not to save the image on disk
Actually My scenario is I have an image.
I have converted the image into byte[] using this code
Bitmap bmp = new Bitmap("c:\\empty.jpg");
byte[] rawData;
using (MemoryStream ms = new MemoryStream())
{
bmp.Save(ms, System.Drawing.Imaging.Ima
rawData = ms.GetBuffer();
}
Now I want to load this image to the Image web control How can I do that
> Now I want to load this image to the Image web control How can I do that
you cannot. The webcontrol takes a link to an image (which is why I suggested to store it locally). The other alternative is to create a HttpRequestHandler that creates this image on-the-fly and serves it as a link to your Image web control.
A web page is toally different then a winforms application. It's components work by just laying themselves out on the canvas of the HTML page. And HTML cannot do images, it can only do urls to images. Which is what the Image web control does: it renders itself to the html page as an img tag with a src attribute, which must be present on the server. That "present on the server" can arranged "on the fly" if need be, but then you need a HttpRequestHandler.
There are many such code examples on the net (google for request handler image). One such examples is this one, it includes a step-by-step on how to configure IIS: http://www.c-sharpcorner.c
Business Accounts
Answer for Membership
by: abelPosted on 2009-05-06 at 01:04:12ID: 24312085
My choice of action would be (assuming they are not in the same application, because you seem to be mixing ASP.NET with WinForms) is to save the Drawing.Image to disk as JPG or PNG and to add that as a link to the Web.UI.WebControls.Image.