Hi there,
Glad you like the book so much.
Did you make any changes to the code? This is supposed to work. The code you posted creates a new product by passing two arguments (the productId and the categoryId to the constructor. The Product class has this constructor:
Code:
Public Sub New(ByVal productId As Integer, ByVal theCategoryId As Integer)
Me._id = productId
Me._categoryId = theCategoryId
End Sub
So, the code you posted should work provided you haven't modified the Product class constructor in App_Code\BusinessLogic\Product.
vb.
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
Beginning ASP.NET 3.5 : in C# and VB,
ASP.NET 2.0 Instant Results and
Dreamweaver MX 2004
Want to be my colleague? Then check out this post.