Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking 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 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 May 29th, 2008, 11:32 AM
Authorized User
 
Join Date: Sep 2007
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB Display Photo using URL from Database

I have a DetailsView control displaying fields from my Walks database. A table in the database contains the URL of an online photo, together with dimensions and file size. The source code for the field is:
Code:
<asp:boundfield DataField="ImageURL" HeaderText="Group Photo"
HtmlEncode="True" NullDisplayText="Sorry, no photo available." />
At the moment, the URL is displayed as text. How can I persuade the field to evaluate the string and fetch the photo?

Richard
Rugeley, UK
WinXP Pro SP2
VBW Express + SQL Server 2005 Express
__________________
Richard
Rugeley, UK
WinXP Pro SP2
VBW Express + SQL Server 2005 Express
 
Old May 30th, 2008, 02:25 AM
Authorized User
 
Join Date: Dec 2006
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Use ImageField - <asp:ImageField DataImageUrlField="ImageURL"...

Angshujit

 
Old May 30th, 2008, 05:31 AM
Authorized User
 
Join Date: Sep 2007
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your suggestion - I added the ImageField control.

There was one other lesson for me - to change the URLs I had previously stored for my online photos at Flickr. Having done that they now display in the DetailsView.

Richard
Rugeley, UK
WinXP Pro SP2
VBW Express + SQL Server 2005 Express





Similar Threads
Thread Thread Starter Forum Replies Last Post
Error posting photo to photo album abel714 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 February 5th, 2007 03:07 AM
Display 'no photo' in a JSP when photo is not pres Inderjeet Pro JSP 0 April 21st, 2006 05:35 AM
Display Url from database in Status bar ntriqetev VS.NET 2002/2003 1 November 16th, 2004 02:44 AM
Help: photo gallery from C# to VB.net? eureka VB.NET 2002/2003 Basics 0 September 4th, 2004 04:04 AM





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