Wrox Programmer Forums
|
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 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 March 4th, 2006, 09:18 AM
Authorized User
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error In Code

Please can I get some help I am having some problems with the Try it outs, on the Beginning ASP.NET book. Chapter 13. The first 2 Try it outs, for the WroxShop and WroxShopITem.

I have followed both try it outs to a TEE and now when I run the WroxShop.ASPX file, I am getting the following error.

Compiler Error Message: BC30516: Overload resolution failed because no accessible 'Eval' accepts this number of arguments.

Source Error:



Line 18: RepeatColumns="4" RepeatDirection="Horizontal">
Line 19: <ItemTemplate>
Line 20: <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%# Eval("PictureURL", "ProductImages\thumb_{0}") %>' PostBackUrl='<%# Eval"ProductID", "WroxShopItem.aspx?ProductID={0}" %>' /><br />
Line 21: <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>'></asp:Label><br />
Line 22: <asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("Price", "{0:C}") %>'></asp:Label><br />


Please help me asap as this is preventing me from continuing with the rest of the chapter.

Thanks




 
Old March 4th, 2006, 01:32 PM
Authorized User
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok I have found on this that if I remove the code for

Eval"ProductID", "WroxShopItem.aspx?ProductID={0}" then the Wrox shop works ok but if I click on the picture then nothing happens.. So I guess that means somthing is wrong with this line.. Authors, any ideas ?

Thanks

 
Old March 5th, 2006, 07:25 PM
Authorized User
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have tried to change this to Eval"ProductID", "~/WroxShopItem.aspx?ProductID={0}" on the custom properties of the PostBackURL an d I still get the same error. I have tried this in both IE and Firefox still to no avail.

Please HELP



 
Old March 5th, 2006, 08:29 PM
Authorized User
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK either I am really stupid or there is something wrong with this code. because when I add the Eval"ProductID", "WroxShopItem.aspx?ProductID={0}" to the PostBackURL of the PictureButton on WroxSHop.aspx (as described in step 16 - 19 on Page 478 Chapter 13. I get the error as described above. But when I remove that line, I can display the page but none of picture links work . So the question I have, am I the only one getting this or are there others.. I have now re tried this at least 8 times I still get the same problem EVERYTIME I am getting VERY FRUSTRATED .. :-) Probably because its late on a Sunday night and I have been working on this same chapter for a couple of days now, trying to get this right .

PLEASE HELP!!!!




 
Old March 7th, 2006, 11:24 AM
Friend of Wrox
 
Join Date: Apr 2005
Posts: 190
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tegwin:

I do not have an answer for you. I do have a couple of suggestions though.

(I have just gone thru the book, but I skipped Ch 13 because I do not need
to develop for an ecommerce environment.) Nevertheless, I found many, many
typos and small inconsistencies as I went thru the book as it seems you are
finding -- some of which I brought to this forum.

My suggestion is to go to the ...BegASPNET2\Chapters\End... folder and find
the code the authors say is the final product. Test that.

If the \End folder
code produces the same error as your's does, it's likely that:

The authors wrote the \End code before development of the language had
been completed.

It's also possible that the \End code was not fully checked out as good.
(This is the worst case scenario because now you have nowhere to turn to
for help, except possibly here at the forum.)

If the \End code is GOOD, then you definitely have an error somewhere.
Eliminate all your code and add the \End code, one statement at a time until
you narrow it down to the one single line that causes the error. Read up
on that one statement. (Frustrating and time consuming but there is no
other way that I know of, if you are working alone.)

Always read the help files and read about the line or code or command that is
causing the problem -- if you can narrow it down that much. I had to do that
several times. Basically, then after understanding the help file, I threw out
what the \End folder code said and did it from scratch myself. Extremely time consuming, but you DO get a lot of practice on the command/code causing the
problem.

Several of the more senior and experienced forum members including authors very
often will help you when they have time to verify the error you encounter, but
this may not always get you the immediate help you want.

I am not associated with Wrox Books in any way, but I do have to say that over
the years I have found them to be better than other publishers when it comes to
furnishing the developer community with self-instruction books.

Good luck.

VictorVictor



 
Old March 9th, 2006, 07:43 PM
Authorized User
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Victor,
Thanks I have figured out what is wrong here. I copied that line in from the code in the FINAL Product and that worked.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Code NadAf BOOK: Ivor Horton's Beginning Visual C++ 2005 0 February 18th, 2008 11:16 PM
Code error reverand Excel VBA 1 November 15th, 2006 02:08 AM
Code error??? emyr BOOK: Beginning Java 2 1 October 31st, 2006 05:47 PM
Code error!?!? Brian Campbell BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 3 November 26th, 2004 07:47 PM
Error displayed with error trap code stoneman Access 4 February 28th, 2004 02:53 PM





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