Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 June 13th, 2006, 04:15 AM
Registered User
 
Join Date: May 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retriving Images from database into DataGrid

Hai,
I have images stored in a database in binary code i want to retrivre them and store them in a datagrig.I would be glad to read from you
Thanks and Regards,
Ashok

ashok
 
Old June 17th, 2006, 03:20 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to raj1_syed
Default

how we > Retriving Images from database
 
Old June 17th, 2006, 10:31 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ashok,
     A possible solution would be something like this:

<asp:datagrid>
<columns>
<itemtemplate>
<img src='./display_image.aspx?imageID=[IDhere]'>
<itemtemplate>
</columns>
</datagrid>

1 I know this code is not syntactially correct, its not meant to be, its just to give you an idea.
2 The image link references another .NET page; what happens is that that page will get sent the value of the image id which should reference a row in your database. You can then pull that binary stream from the Database and return it via that page [display_image.aspx] and it should be displayed in your datagrid.

This is a very rudeimentary thing to do (IMHO).

-Doug

"The one language all programmers understand is profanity."





Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Images from and Save Images to a Database cyndie VB.NET 2 August 17th, 2008 06:42 AM
uploading and retriving images from sql servver bobwith5 ASP.NET 2.0 Basics 1 October 17th, 2007 11:37 AM
Uploading & retriving Images From Database aaaboye Classic ASP Basics 1 February 20th, 2007 04:03 PM
retriving picture from database(sql) to <asp:image aspnet79434319 Classic ASP Basics 0 June 21st, 2005 01:29 AM
Datagrid with images Jango ASP.NET 1.0 and 1.1 Basics 3 June 26th, 2004 11:40 PM





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