p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 (http://p2p.wrox.com/forumdisplay.php?f=388)
-   -   [newbie] ProfileCommon ? (http://p2p.wrox.com/showthread.php?t=73301)

jon80 March 13th, 2009 09:19 AM

[newbie] ProfileCommon ?
 
1. Listing 16-8

Does ProfileCommon require some namespace?
..
<%@ Page Language="C#" Import="System.Web.Profile.ProfileBase"%>
..

2. According to Pg.13 the Page Directive can have a Import attribute, however, I am getting the following error when trying to build Listing 16-8:

Error 2 Error parsing attribute 'import': Type 'System.Web.UI.Page' does not have a public property named 'import'. c:\inetpub\wwwroot\TestWebSite\Default.aspx 1

Web Profile Builder at (http://weblogs.asp.net/joewrobel/arc...-projects.aspx)
for VS 2005, seems to be related to the issue, but I'm not too sure, can you help?


Environment notes
Visual Studio 2008 SP1 + .NET 3.5 SP1

Imar March 14th, 2009 02:43 PM

Hi there,

Import is not an attribute of the Page directive; it's an element on its own:

<%@ Page Language="C#" .... %>
<%@ Import Namespace="YourNamespace" %>

Hope this helps,

Imar


All times are GMT -4. The time now is 05:28 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.