using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CodeCafe.Web;
public partial class Site : System.Web.UI.MasterPage
{
/**********************************************************************************************************/
///
/// Handles the Load event of the Page control.
///
/// The source of the event.
/// The instance containing the event data.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
RenderMenuItems();
}
/**********************************************************************************************************/
///
/// Renders the menu items.
///
private void RenderMenuItems()
{
string menu = AddMenuItem("Home", "Default.aspx", "Default.aspx,Terms-and-conditions.aspx,sitemap.aspx", "mnuHome_def.png");
menu += "
";
menu += AddMenuItem("Features", "Features.aspx", "Features.aspx", "mnuFeatures_def.png");
menu += "";
menu += AddMenuItem("Order Now!", "Order-Now.aspx", "Order-Now.aspx,Shopping-Basket.aspx,ProcessPayment.aspx", "mnuOrderNow_def.png");
menu += "";
menu += AddMenuItem("Learning Centre", "Learning-Centre.aspx", "Learning-Centre.aspx,What-is-CRM.aspx", "mnuLearningCentre_def.png");
menu += "";
menu += AddMenuItem("News & Blogs", "News.aspx", "News.aspx,News-View.aspx,Blogs.aspx,Blog-View.aspx", "mnuNewsAndBlogs_def.png");
menu += "";
menu += AddMenuItem("FAQ", "FAQ.aspx", "FAQ.aspx", "mnuFAQ_def.png");
menu += "";
menu += AddMenuItem("About Us", "About-Us.aspx", "About-Us.aspx", "mnuAboutUs_def.png");
menu += "";
menu += AddMenuItem("Contact Us", "Contact-Us.aspx", "Contact-Us.aspx,Contact-Us-Map.aspx", "mnuContactUs_def.png");
menu += "";
ltMainMenu.Text = menu;
}
/**********************************************************************************************************/
///
/// Adds the menu item.
///
/// Name of the page.
/// The page URL.
/// Type of the page.
///
private string AddMenuItem(string PageName, string PageURL, string CheckPages, string ImageURL)
{
string result = "";
if (CheckPages.ToUpper().Contains(Utils.GetWebFilename(Request.Url.AbsolutePath.ToString()).ToUpper()))
ImageURL = ImageURL.Replace("_def", "_ovr");
result += "
";
return result;
}
/**********************************************************************************************************/
}