I am following along a book I purchased, ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
I am getting the following errors:
Error 1 The name 'MenuTabs1' does not exist in the current context C:\Documents and Settings\iweiss\my documents\visual studio 2010\Projects\Elite Tool Kit\UI\EliteToolKit.Master.cs 21 9 UI
Error 2 The name 'Globals' does not exist in the current context C:\Documents and Settings\iweiss\my documents\visual studio 2010\Projects\Elite Tool Kit\UI\EliteToolKit.Master.cs 21 31 UI
EliteToolKit.Master.Cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using BLL.Framework;
using FrameworkControls;
public partial class EliteToolKit : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
//Set the top menu properties
MenuTabs1.Menuitems = Globals.GetMenuItems(this.Cache);
}
}
Global.cs (which is in App-Code)
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Caching;
using BLL.Framework;
/// <summary>
/// Summary description for Globals
/// </summary>
public static class Globals
{
#region Constants
public static ENTMenuItemBOList GetMenuItems(Cache cache)
{
//Check if the menus have been cached.
if (cache[CACHE_KEY_MENU_ITEMS] == null)
{
LoadMenuItems(cache);
}
Is there an item on the .aspx page for the master page?
Not used the app-code directory before, but it could be that you need to include the class with a "using..." statement because it is not in a namespace.
Bookmarks