Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 22nd, 2011, 11:23 AM
Authorized User
 
Join Date: Feb 2011
Posts: 33
Thanks: 5
Thanked 0 Times in 0 Posts
Default Problem with Try It Out pg545-546

Hi Imar,

I'm getting this error when I try to run Genres.aspx

Quote:
Server Error in '/Site' Application.
--------------------------------------------------------------------------------

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'DataRowView' could not be found (are you missing a using directive or an assembly reference?)

Source Error:



Line 18: {
Line 19: case DataControlRowType.DataRow:
Line 20: DataRowView myDataRowView = (DataRowView)e.Row.DataItem;
Line 21: if (Convert.ToInt32(myDataRowView["NumberOfReviews"]) > 0)
Line 22: {


Source File: c:\BegASPNET\Site\Management\Genres.aspx.cs Line: 20
Any idea?

Regards,
 
Old March 22nd, 2011, 11:25 AM
Authorized User
 
Join Date: Feb 2011
Posts: 33
Thanks: 5
Thanked 0 Times in 0 Posts
Smile

Found it! Wasn't using: using System.Data;

Regards









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