How can set an image from SystemDrawing.Image into WebControls.Image?

I want directly to set an image from SqlServer to the webform. Do you know how to do it ? please tell me.

In the window form I saw a method to set an image from SqlServer:
byte[] imgData=(byte[])dr["PictureFile"] // dr is SqlDataReader when call data from SqlServer
MemoryStream ms = new MemoryStream(imgData);
PictureBox1.Image = System.Drawing.Image.FromStream(ms);
but I have not yet seen any method set an image from SqlServer to WebForm. Have you seen it please tell me, thanks.
2/18/2005 2:35:08 AM 93655 articles. 6 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 11


Similar Artilces:

Image in image
Hi, I have a project where clients viewing my website can buy t-shirts. They can choose from a number of t-shirt colors and shapes which are their plain colour. They can also choose a number of prints to be placed on the t-shirt. These will be graphics stored in a database. My problem is on how I can displaty the t-shirt with the graphics or logo they chose on te t-shirt. It would be something like drawing text on an image but instead drawing an existing image on the base image. Any Ideas? (I am using visual studio 2005 and vb.NET)   RegardsMerovingian you 1. You can create a...

Image on Image
I am trying to display a page that has image of a map on it. The user can then place other images of red thumbtacks on the image at different locations. Then when these thumb tacks are clicked on, they open a folder of pics related to the area. I saw a method in the imageButton class that returns the (x,y) of the location where the user clicked. I thought I could use this information to place another, smaller image button, on that area. My problem is that i can't seem to get the bottom imageButton to be transparent so I can see the smaller one. Am i on the right track with this. Any advi...

Imaging, but not imaging
We multicasted to 43 machines. Updated the image on the master. Multicasted the updated image to 36 machines. (the other 7 wouldn't join the session for some unknown reason). I visually verified that all 36 were imaging. One of the 8 which didn't rename appears to not even have been imaged. The problems with the previous image were still there. It's as though the machine didn't image even though I saw it take part in the session and the temp bar going across the screen. What the heck's going on here? AlaN As a try, what happens if you boot either to PXE ...

image and image
// create an image object, using the filename we just retrieved System.Drawing.Image image = System.Drawing.Image.FromFile(Server.MapPath(file)); // create the actual thumbnail imageSystem.Drawing.Image thumbnailImage = image.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);   now my question is how to display this image in my image1 control in (version 1.1) the below line of code is not working.  Image1.ImageUrl=thumbnailImage.ToString();Mark As Answer If my reply helped you. Hi, you can save t...

Can you dynamically set the image url in a mobile form mobile image ?
I am testing mobile forms, I have created a mobile form with a mobile image. <mobile:Image ID="Image6" Runat="server"   ImageUrl="<%#Prodphoto%>" >  I would like to set the image based on the selected value as follows private string _prodphoto;    public string Prodphoto    {        get        {            return _prodphoto;        } ... problem: i can not view image data for the rest of my table rows except the image for the first row but i can read all the other non image fields for all rows.
Hi i have a table with the following fields imgdata........image imgtitle.........varchar(max) imgType........varchar(max) imgLength.....bigint i have no problem with uploading the image but viewing the uploaded image(s) in a gridview has caused me great pain. The probelm is i have two pages. page1 grabs the image to display and page2 has a gridview that displays the grabed image. I wanted to have an sql statement like SELECT * FROM mytable WHERE incident_id=someValue. IF i have 5 records in this table and i view page2 ...

display image in a image image button
hi   i have to display an image in image button while uploading mycode Image1.ImageUrl = Upload.PostedFile.FileName; is not working thanks Hi You need to save the PostedFile to the disk on the server and then assign it to ImageUrl. Take a look at the following links for more infoprmation on how to do this. Nassabehwww.professionalcsharp.comDon't forget to click "Mark as Answer" on the post that helped you. That way ...

'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image'
In my aspx page, I have the following snippet: <%@ Page Language="C#" %><%@ Import Namespace="System.IO" %><%@ Import Namespace="System.Drawing" %>     public System.Drawing.Image Test()    {      ...    }  I keep getting the 'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image' error in my Test function (which returns an Image). How do I fix this? Right which is possible; use the full...

CS0104: 'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image'
 CS0104: 'Image' is an ambiguous reference between 'System.Web.UI.WebControls.Image' and 'System.Drawing.Image'   <%@ Page Language="C#" %> <%@ Import Namespace="System.Drawing" %> <%@Import Namespace="System.Drawing.Imaging" %>   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""><script type="text/C#" runat="server"> void Page_Load() {//The @ means "Ignore escape characters!" in the following string. It is a verbatim //literal string - any backslashes (and newlines) in...

Can't set image on image control
I'm trying to load an image but it doesn't show, the code is this:  this.Image1.ImageUrl = @"C:\image1.jpg"; i can only see the images i set in the control in design mode (setting the imageurl property..and only show  the images in the Resources folder) what can i do??VBA Well you can't set it as path on your drive, you need to give it a URL.  When you page is served up, the person viewing the page has no access your harddrive directly so you need to put the image in a directory that is available to the web. Put the image in your application di...

Show Image on the System.Web.UI.WebControls.Image
Hi I have image stored as bytes in the SQL Database. I can read this into byte array depending on the user selection. Now I want to show the loaded image (which is in byte array) in the image control on my aspx page. Can somebody help me with this You'll want to set the ImageUrl tag to an ASPX page, and then make that ASPX page retrieve the image and output it to the http output stream. See this article for more info: WallingASP.NET MVPMy blog, Software by RobPlease click "Mark as Answer&...

How can I put the images on a image?
How can I put the images on a image? Is Layer should be set? Is True, how to do it? Can anyone solve my problem with example or codes? Thx very much What do you mean by "put the images on a image"?Microsoft MVP - Windows Live PlatformBlog: | Web.Maps.VE - ASP.NET AJAX Virtual Earth Control <IMG id="myImage" alt="Alternate text" src="myImage.gif"> Or, for server controls: <asp:Image id="myImage" runat="server" ImageUrl="myImage.gif"></asp:Image>...

Drawing.Image to WebControls.Image
Hi all,  I return a WebControls.Image from my class. Due to it is a Drawing.Image, WebControls.Image don't accept it.   Any suggestion on how should I do it?   I tried doing a "Save" for Drawing.Image but it always give me error Lu5ck:I return a WebControls.Image from my class. Due to it is a Drawing.Image, WebControls.Image don't accept it. Those 2 types are quite different from each other and are not interchangeable WebControls.Image represents an html <img /> tag.Drawing.Image represents an actual binary image. I cannot determine from your description which...

Dynamic Image and Image Webcontrol
 Hi, I have a dropdownlist in an update panel and an image control in another update panel. i'm using 2.0 and in visual studio 2005.When i select a value from the Dropdown list i create an image. At the moment i save the image to the server and use image.imageurl = location of the image. But i would like to just send the image to the user and not have to save it. i have tried,bitmap.jpeg) But i get an error saying the response is unkown, so i added "imports systemn.web"i get a new error 'reference to a non ...

Web resources about - How can set an image from SystemDrawing.Image into WebControls.Image? -

Resources last updated: 11/27/2015 1:22:35 PM