Subject: Error: Chapter 3 (try it out) page 85
Posted By: dea0303 Post Date: 8/29/2006 5:47:27 PM
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.cs    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()
    {
    }
  }
}


Go to topic 49027

Return to index page 190
Return to index page 189
Return to index page 188
Return to index page 187
Return to index page 186
Return to index page 185
Return to index page 184
Return to index page 183
Return to index page 182
Return to index page 181