Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 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 July 26th, 2010, 08:13 PM
Registered User
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default MenuTabs1 and Global not in the current context

I am in Chapter 4, page 98...

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

private const string CACHE_KEY_MENU_ITEMS = "MenuItems";
private const string CACHE_KEY_USERS = "Users";

#endregion Constants

#region Methods

public static ENTMenuItemBOList GetMenuItems(Cache cache)
{
//Check if the menus have been cached.
if (cache[CACHE_KEY_MENU_ITEMS] == null)
{
LoadMenuItems(cache);
}

return (ENTMenuItemBOList)cache[CACHE_KEY_MENU_ITEMS];
}

public static ENTUserAccountEOList GetUsers(Cache cache)
{
//Check for the users
if (cache[CACHE_KEY_USERS] == null)
{
LoadUsers(cache);
}

return (ENTUserAccountEOList)cache[CACHE_KEY_USERS];
}

public static void LoadMenuItems(Cache cache)
{
ENTMenuItemBOList menuItems = new ENTMenuItemBOList();
menuItems.Load();

cache.Remove(CACHE_KEY_MENU_ITEMS);
cache[CACHE_KEY_MENU_ITEMS] = menuItems;
}

public static void LoadUsers(Cache cache)
{
ENTUserAccountEOList users = new ENTUserAccountEOList();
users.Load();

cache.Remove(CACHE_KEY_USERS);
cache[CACHE_KEY_USERS] = users;
}

#endregion Methods
}

Any ideas???

Thanks!





Similar Threads
Thread Thread Starter Forum Replies Last Post
The name 'Request' does not exist in the current context janilane BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 July 13th, 2010 05:46 PM
P552: The name 'Roles' does not exist in the current context eddiemcham BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 3 May 1st, 2009 05:03 PM
The name 'partOneStep' does not exist in the current context pallone ASP.NET 3.5 Basics 11 March 4th, 2009 05:30 AM
The name 'txtOperande1' does not exist in the current context stevemcd999 BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 3 February 25th, 2009 11:58 PM
Position of a node outside current context QuickSilver002 XSLT 2 April 19th, 2007 02:07 PM





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