Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 11th, 2008, 08:10 AM
Authorized User
 
Join Date: Mar 2008
Location: Delhi
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..

Ragards,
Pankaj Bahuguna

__________________
Thanks
-Pankaj Bahuguna
  #2 (permalink)  
Old August 11th, 2008, 10:41 AM
Friend of Wrox
 
Join Date: Nov 2007
Location: Central Florida, USA.
Posts: 207
Thanks: 2
Thanked 15 Times in 15 Posts
Default

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
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 06:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.