View Single Post
  #9 (permalink)  
Old January 23rd, 2012, 07:43 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,042, Level: 100
Points: 72,042, Level: 100 Points: 72,042, Level: 100 Points: 72,042, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,081
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

You get these at development time, not at run-time right? That means something is wrong.... ;-)

I can see a few possible reasons for this problem:

1. Your ASPX page is called Mileage as well. This may or may not cause a name conflict with your mileage class. Try create a new file with a new name and copy in the code (or rename the file, and the reference to Mileage in the markup and code behind.)

2.Something is wrong with your model so it doesn't compile. Try commenting out the failing code in this ASPX page, cose all open files, and press Ctrl+Shift+B to rebuild all code. Do you still get errors?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
leeWozyWarren (January 24th, 2012)