Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 Search this Thread Display Modes
  #1 (permalink)  
Old January 18th, 2004, 02:50 PM
Registered User
 
Join Date: Jan 2004
Location: Suffield, CT, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid for display images

I am still fairly new to this process. But, I am looking for samples of using the data grid to display thumbnail images; specifically, I am retunring data from an Access database table. I want to show a list of company names and a thumbnail logo (probably a gif or tif).

  #2 (permalink)  
Old January 18th, 2004, 03:04 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You'll need to create a new aspx page that feeds the image. You can't output image binary data directly to the page, you can only provide a URL for the image. So you would need to provide an image url that looks likes this:

companylogo.aspx?companyID=123

Inside of companylogo.aspx you will have to read the database again and extract the binary data, then write it out to the page using BinaryWrite(). Here's a snippit from a page I use that does this:

Response.Clear()
Response.ContentType = "image/jpeg"
Response.BinaryWrite(objStream.ToArray)
Response.Flush()

objStream is a memory stream object that I'm creating from multiple source, but non of which are a database so I can't provide much help with doing that specific piece.

Peter
------------------------------------------------------
Work smarter, not harder.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Display images from lightbox kumiko Classic ASP Basics 2 February 25th, 2008 10:19 PM
How To Display Images in DataList abdul_owiusa General .NET 1 May 20th, 2005 09:01 AM
how to display images ? shirley65 C# 2 May 31st, 2004 08:12 AM
Datagrid to display thumbnail images sam.johnston@jtisys.com VB.NET 3 January 19th, 2004 01:36 PM



All times are GMT -4. The time now is 10:41 AM.


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