Displaying a database image on a web page?

I am having trouble locating any examples of how to output an image to an html page that is originally sourced from a blob column of an sql data table.

I cannot directly display the image as I have to remove the first 4 characters from the stream before the image data starts.
In the past with other languages I have written this image stream out to file and passed the imageurl to the page. This worked ok but it left me with the maintenance task of cleaning these temp image directories at a later date.
Is there a way I can bind a stream of bytes directly to an image control and have that control deal with sending it to the browser or am I doomed to work with image temp directories?
any help greatly appreciated
rgds
Mike!
Forever Onwards Is The Call!
0
mcdeath
1/29/2004 2:35:04 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

2 Replies
578 Views

Similar Articles

[PageSpeed] 38



I remember reading somewhere about an interesting solution to this problem. Unfortunately, I don't remember all of the details, but it involved setting the src attribute on an image control to an .aspx page. The .aspx page outputs the binary stream. I haven't tried this, but it sounds interesting.

Jamie Kindred, CGA, MCSD
0
NetProfit
1/29/2004 2:44:27 PM
0
NetProfit
1/29/2004 2:49:37 PM
Reply:

Similar Artilces:

C#.NET WEB APPLICATION
hei guys, i need help on my application, i'm using C#.NET as front-ed and SQL as back-end, aside from a datagrid, i want to display my data using textboxes and not a datagrid, i can do it using Visual Basic 6 but since i'm a newbee at C#.NET i don't know how to do it, specially the codes, can anyone help me with it? thank you in advance! If you are doing windows development, i would suggest using 'DataForm wizard' (Use Solution Explorer-->Rightclick project-->Add new Item-->New DataForm). It will guide you through steps. If you are doing web apps. Use quickstart to learn them. h...

Can my web page with a form submit to other web pages forms?
I was wondering if I created an aspx page that had a form on it that I could use the submit button to submit this form's contents to other web pages forms(servers accepting those form's data). I am thinking this would be a great way to update data on particular web pages without having to actually visit those similar web pages. Any ideas, examples would be much appreciated. Thanks in advance.  Yes you can.  It's called Cross Page Posting: http://msdn2.microsoft.com/en-us/library/ms178139.aspxAlso: http://msdn2.microsoft.com/en-us/library/ms178140.aspx might ...

how to save image on server and add image url to database for display on web page
I am trying to figure out how to allow a user to insert a new record into the database with the option of adding an image to the item.  The picture would then be saved on a web server and the link to the picture would be saved in a column of the table.  I would then need to display the picture along with its other information such as a description when the user selects the record from a drop down list on the page.  I have been searching everywhere and cannot find a good guide to help me accomplish this.  Can someone please help me?   There are a bunch of starter k...

Sharepoint help! Error msg : "A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe"
hihi, I have set up a testing virtual server on my local machine. I installed win server 2003, wss 2.0, sql server 2000, and visual studio .net 2003. i tried to create a project in C# but when i build it and import the web part (.dwp) into the page, there is this error msg "A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe"  I seached most of the sites and they informed that the problem lies in the safe control in web.config i enter the safe control in web.config but i does not know where to put ...

how can you display another web site's web page in your web page without leaving your site
Can you display another web site's web page in your web page without leaving your site? I know you could use a frameset with .asp, but it looks like Visual Web Delevoper 2005 does not have any controls to setup a frameset. Any help, that would point me in the right direction would be great. Thanks Patrick     With screen scraping 4GuysFromRolla.Com: Screen Scrapes in ASP.NEThttp://www.4guysfromrolla.com/webtech/070601-1.shtmlThanks,Teemu KeiskiFinland, EU Thank you. This information was a great help!!! Thanks again Patrick...

How to display an image saved in a database on the web page?
I need to read an image from the database and display it on a webpage.... any ideas?  Thanks in advance :) Hi, I hope the article will help u.. http://www.odetocode.com/Articles/172.aspx CheersPlease mark as Answer if it helps u. Thanks!Parth PatelTechsture TechnologiesSoftware DeveloperAhmedabad Hi, If you have seave the details related to the images,  then just read the details and set the path of the image to image control. Try: http://www.codeproject.com/KB/asp/Display_Images_from_Data.aspx http://codebetter.com/blogs/eric.wise/archive/2005/05/15/63236.aspxRegards,A...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Strange output in web form after web form is displayed.
   I have been using a web user control for over a week now with no problems. I am now getting strange output in my web form after my controls display on the page. Below is the strange output. Can anyone tell me what is wrong here? Note I did not include it all because it is quite large.   Request Details Session Id: l5b5vkazucfatba4oliaw1vi Request Type: POST Time of Request: 9/10/2007 4:59:59 PM Status Code: 200 Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8) Trace Information Category Message From First(s) F...

how to open a web page in form of a popup web page
Hello, I have two web pages, let say. Page A : With a Button on it. PAge B: with some info. Now I need to: When I click on the Button of page A.Page B must open in a pop up window.  I can do this but problem is this when I clicked on the button for first time it does not show me any thing and when I clicked on the button for second time then It shows me Page B .My code is as follow:  1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!this.Page.IsPostBack) 4 { 5 6 } 7 else 8...

Could PB .NET Web Form POST security Information to others web page??
This is a multi-part message in MIME format. ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: quoted-printable Hi,=20 Have anyone came across the requesion to POST security informations from = PB .NET web form web page to other web site?? I have tried many datys, Could any kind man give me some suggessions?? thanks & Best regards Leon ------=_NextPart_000_00F9_01C9C4D5.8FB45C90 Content-Type: text/html; charset="big5" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML P...

Mobile Search Web Form to display image from database
Hello, I'm am looking to create a mobile web form which is accessed from a blackberry using a web browser which uses 2 text boxes to enter an individuals first or last name and when the submit button is pressed the individuals image displays from databse. Am I in the right place? Can anyone help? Hello, you can use the Image Control to display images. The image url depends on where your images are stored. If they are stored in the database you have to find a solution for this scenario (cf.: http://www.google.de/search?hl=de&q=ASP.NET+image+database&meta=). If they are sto...

Error in Creating a Web Page to Display Access Database Data in Visual web developer
I am new to visual web developer . I created the page by simply dragging the  grid view and data access component into the design page like what is mentioned in walkthrough of visual web developer help .While I am creating a web page using access database following error is displayed. A name was started with an invalid character. Error processing resource 'http://localhost/AccessSample/Default.aspx'. Line... <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> -^ My operating system is Windows XP professional. I will appreci...

from where i have to call image and display in web page folder or database path
hi all, i have stored Image in folder and Path into sql server database table now i have to display image on web page from where i have to reterive either from Path (database) or Folder. if iam reterving from folder then what is the use of path of image which is stored inside database table please guide me in this issue. Best Regardslife is name of learning!Mark as an answer if it helps  When you wanted to store the images in encryped paths, so as not to make it obvious to any intruder. Then you will have to store the paths in the database. Also. If you are dealing with loads and l...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Web resources about - Displaying a database image on a web page? - asp.net.web-forms

List of mammals displaying homosexual behavior - Wikipedia, the free encyclopedia
For these mammals, there is documented evidence of homosexual behavior of one or more of the following kinds: sexual behavior , courtship , affection ...

Facebook Displaying Page Insights On Page Admins’ Personal Pages?
Some Facebook page administrators are seeing modules on their personal pages displaying page insights ad, campaign , and like totals for pages ...

Facebook Displaying Unread Messages from Pages in a New Updates Module
Facebook is displaying a new “Updates” sidebar module which shows some users unread messages sent to them by Pages. Users will see the Updates ...

Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air CNN Live - YouTube
Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air Lemon held up a Confederate flag first before holding up the sign. He asked, ...

Hazelwood coal mine fire: Morwell residents displaying symptoms similar to cigarette smokers, expert ...
An expert says some locals near Victoria's Hazelwood mine fire have symptoms similar to cigarette smokers.

Police accused of displaying fake G20 weapons
Toronto's top police officer misled the public by displaying fake weapons used in a medieval-themed role-playing game to help justify their actions ...

No charges for U.S. host for displaying high-capacity magazine on TV
NBC television journalist David Gregory won't face charges for displaying a high-capacity ammunition magazine on his "Meet the Press" news program ...

Jays' Escobar suspended three games for displaying slur
Toronto Blue Jays shortstop Yunel Escobar has been suspended three games for displaying a homophobic slur on his eye-black during a game on Saturday. ...

Google Play Store now displaying age-based ratings
We reported back in May that Google was adding age-based ratings to all apps in the Play Store as determined by the International Age Rating ...

Apple displaying Ferraris & other cars at WWDC hinting at CarPlay announcements
... 2014 Filed under: AAPL Company , iOS Continue reading more about AAPL Company and iOS at 9to5Mac . What do you think? Discuss "Apple displaying ...

Resources last updated: 12/10/2015 4:22:53 AM