Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 May 17th, 2008, 05:59 AM
Registered User
Join Date: May 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Eval ImageUrl doesn´t work

Hi guys.

I´m on chapter 7 - Reading Data

and i can´t put the command
<asp:Image ID="Image2" ImageUrl='<%# Eval("PictureURL","~/MatchImages/{0}") %>' runat="server" /> work!

I want to read the name of a file on database and then see the image on the ImageControl.

If i do this:
<asp:Image ID="Image1" ImageUrl="~/MatchImages/aaronson.jpg" runat="server" /> i can see the image

and if i to this:
<asp:DataList ID="DataList1" runat="server" DataKeyField="PictureID" DataSourceID="SqlDataSource1">
                <br />
                <asp:Label ID="PictureURLLabel" runat="server" Text='<%# Eval("PictureURL") %>'></asp:Label><br />
                <br />
         i can see the name of the image.

Thanks in advance for your help.

Best Regards

  #2 (permalink)  
Old May 23rd, 2008, 05:57 AM
Authorized User
Join Date: Sep 2007
Location: Rugeley, , United Kingdom.
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts

I'd like to say I've spotted an error, but no sorry I can't see what the problem is. I compared your code with the grey code block and its explanation below on p242 of the book, and checked the errata.

The problem I had with that exercise is that I could only display one image regardless of the settings of the Repeat... attributes. I found that there was only a single entry in the Gallery table!

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

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
ImageUrl syntax almotions ASP.NET 2.0 Basics 2 January 24th, 2008 03:47 AM
Databinding the ImageURL Prop of an Image Control Aaron Edwards ASP.NET 2.0 Professional 1 November 22nd, 2007 12:53 PM
RountingSlip doesn´t work Ravel99 Pro VB 6 0 April 26th, 2006 08:33 AM
Session_OnEnd doesn´t work Adlorenzo ASP.NET 1.0 and 1.1 Professional 7 May 22nd, 2004 04:32 AM

All times are GMT -4. The time now is 01:24 PM.

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