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 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 29th, 2008, 11:32 AM
Authorized User
 
Join Date: Sep 2007
Location: Rugeley, , United Kingdom.
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
Reply With Quote
  #2 (permalink)  
Old May 30th, 2008, 02:25 AM
Authorized User
Points: 308, Level: 6
Points: 308, Level: 6 Points: 308, Level: 6 Points: 308, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2006
Location: Kolkata, West Bengal, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Angshujit

Reply With Quote
  #3 (permalink)  
Old May 30th, 2008, 05:31 AM
Authorized User
 
Join Date: Sep 2007
Location: Rugeley, , United Kingdom.
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
Reply With Quote
Reply


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
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



All times are GMT -4. The time now is 07:18 PM.


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