Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 11th, 2008, 08:10 AM
Authorized User
Join Date: Mar 2008
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to myself.panku
Default set image on <asp:Image> stored in DataBase

Hi Guys,

Here what i am trying to do is , i have a table in database containing a column of varBinary type.

 byte[] new_arrByte = (byte[])objDt.Rows[0]["MyPic"];

Now i wanna do is , without making a file in our H-Drive usinfg "new_arrByte" how can i display (new_arrByte) picture on <asp:Image> control.

Please help me...
it's urgent..

Pankaj Bahuguna

-Pankaj Bahuguna
Old August 11th, 2008, 10:41 AM
Friend of Wrox
Join Date: Nov 2007
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts

you will have to output that image onto a page dynamically then have the image's source point to that page using a query string...

<asp:Image ID="Image1" ImageURL="../Image.aspx?ID=1" />

then on your Image.aspx page you would use that ID query string to find that image in the database and output it using Response.BinaryWrite

Jason Hall

Similar Threads
Thread Thread Starter Forum Replies Last Post
<asp:Image /> & hspace Poltroon BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 April 23rd, 2014 04:51 AM
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
<fo:external-graphic> not displaying image devauk XSLT 0 July 18th, 2006 11:40 AM
retriving picture from database(sql) to <asp:image aspnet79434319 Classic ASP Basics 0 June 21st, 2005 01:29 AM
background image for <div> anshul CSS Cascading Style Sheets 4 May 16th, 2005 11:00 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.