Error: Chapter 3 (try it out) page 85
While trying to complete the "try it out" section begining on page 85 of chapter 3, I am continuing to get errors about a missing type or namespace in the file ThemeModule.cs
I find this curious since The try it out is about the sitemap control and I've not made any modifications to the supplied code other than those suggested in the "try it out" sections.
I am using the c# book, widows xp/Professional SQL2005 express and VWD express. Installed as per appendix b.
Any suggestions as to why I am getting this error?
Code and Errors below.
ERROR:
Error 1 The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive or an assembly reference?) C:\Websites\Begin\Chapter03\app_Code\ThemeModule.c s 19 9 C:\...\Chapter03
CODE:
using System;
using System.Web;
using System.Web.UI;
namespace Wrox.Web.GlobalEvents
{
public class ThemeModule : IHttpModule
{
public void Init(HttpApplication context)
{
context.PreRequestHandlerExecute += new EventHandler(this.app_PreRequestHandlerExecute);
}
private void app_PreRequestHandlerExecute(object Sender, EventArgs E)
{
Page p = HttpContext.Current.Handler as Page;
if (p != null)
{
ProfileCommon pb = (ProfileCommon)HttpContext.Current.Profile;
p.Theme = pb.Theme;
}
}
public void Dispose()
{
}
}
}
|