Chapter 7 Try it Out Problems, pages 238,239.
Anyone have the same problems I'm seeing, and hopefully got a fix for them?
1. Page 238, Try It Out Line 7. (From the toolbar...). When you do this, the
image id will be "Image1" not "PictureImage" that the book has. So the problem
is, which should it be? However, I can't get it to run with either.
2. Page 239, Try It Out Line 8. (To get this to ...). Intellisense is not happy with the additional code the book wants you to add. But that aside, eventually I can get my code to look like the book's. However, The next sentence says to "Check your page in the browser..." It does not display an image -- just the little red X.
3. You can't go to the End folder and see how the author's coded the page for this
webpage because they changed the app and proceeded with more discussion. That is, they did not show code for this page at this moment in the development. Readers have no way to get this right. Rather, one just has to move on and bypass this point. This is a bummer because displaying an image in a DataList is going to be a very frequent need. Help!!
VV
Feb 2, '06. Have spent 4 hours fiddling with various code variations on this problem -- trying anything to get it to work. Nothing works. Help. VV
Feb 2, '06. More error on page 238. Figure 7-24 shows Fixture ID as = 1, regardless of what the Picture ID does. When I follow the book (for the 8th time now!), Fixture ID changes right along with Picture ID, (1,1 2,2 etc.). Did anybody proof read these pages? Or am I in outerspace here? Help. VV
Feb 2, '06. More on this (after 2 days of trying to get it to work). I have had partial success in this as follows:
(1) The id of the <asp:Image> control is "Image1", not "PictureImage". Make
that change and
(2) make sure via your Solution Explorer that the folder in your project is
named "Images" (and not "PictureImage") as the book says, and your Images
folder has all the .gif and .jpg files it needs:
Then
(2) Change the ImageUrl code line (as per the book)
from:
<asp:image id="PictureImage" runat="server"
ImageUrl='<%# Eval("PictureURL", "~/MatchImages/{0}") %>'>
</asp:image>
to:
<asp:image id="Image1" runat="server"
ImageUrl='<%# Eval("PictureURL", "~/Images/AddToCart.gif") %>' >
</asp:Image>
(3) This change will get something to show up in the place where an image
ought to be. Not the right thing, but something.
(4) Now all that remains is to get the correct image to display and I can't
find any way to make that happen. What is that {0} all about anyway? Oh yes,
its discussed on page 243, after you need to know about it on previous pages.
VV
|