How to add System.Drawing.Image object to Asp:Image Control

How to add System.Drawing.Image object to Asp:Image Control but I dint have imageId in my table.Image field is in another table..i retrieve image from database in Image object.i want to display it in asp:Image control or grid to do it?? pls send reply... C#


The Image class and <asp:image> control are completely different thing. You need to have a page or http handler to write the Image object as an image file such as .jpg / .png / .gif. And then use the <asp:image> control to access the URL of your page or http handler to get the image file you generated and display it. <asp:image> basically only render a HTML <img> tag with the URL of the image.

You can use this ASP.NET module and the SqlReader plugin to serve images directly from the database.

You can then reference the images like so:

<asp:Image runat="server" ImageUrl="/sqlimages/[imageidhere]" />

Need Your Help

Histogram function in R - breaks argument not working

r plot histogram

I like to create histogram objects per row with defined breaks:

Running Multiple SSH Commands Using Paramiko in Python 3.4.3

python ssh command paramiko

I'm trying to run multiple commands on a box, but ONLY the first command succeeds. It seems something related to fork, but I cannot figure out how to resolve this. Your help or guidance will be dee...