/// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
/// ' Microsoft Content Management Server - Sample Code 
/// '
/// ' This sample code is provided "AS IS" with no warranties, and confers no rights. 
/// ' You assume all risk for your use. (c) 2001 Microsoft Corporation. All rights reserved.
/// '
/// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

using System;
using System.Web;
//Add reference for localization
using System.EnterpriseServices;
using System.Globalization;
using System.Resources;
using System.Threading;
//Add reference for navigation tree control
using Microsoft.Web.UI.WebControls;
//Add reference to the CMS API
using Microsoft.ContentManagement.Publishing;
//Add reference to the Mcms control library
using McmsWebControlLibrary;
using Microsoft.ContentManagement.Web.Caching;


namespace WoodgroveNet.Templates
{
	/// <summary>
	/// Summary description for Intranet_Product.
	/// </summary>
	public class CaseStudies : System.Web.UI.Page
	{
		#region CMS Placeholders		
		protected Microsoft.ContentManagement.WebControls.HtmlPlaceholderControl PlaceholderHtmlControl1;
		protected Microsoft.ContentManagement.WebControls.HtmlPlaceholderControl PlaceholderHtmlControl2;
		protected Microsoft.ContentManagement.WebControls.HtmlPlaceholderControl PlaceholderHtmlControl3;
		protected Microsoft.ContentManagement.WebControls.SingleImagePlaceholderControl SingleImagePlaceholderControl5;
		#endregion CMS Placeholders

		protected McmsWebControlLibrary.PlaceholderControls.McmsXmlPlaceholder McmsXmlPlaceholder1;
		protected McmsWebControlLibrary.McmsBreadcrumbControl McmsBreadcrumbControlCaseStudies;
		
		//Declaring the Literals
		protected System.Web.UI.WebControls.Literal LTCaseStudiesCurrentUser;
		protected System.Web.UI.WebControls.Literal LTCaseStudiesUser;
		protected System.Web.UI.WebControls.Literal LTCaseStudiesCustomerDescription;
		protected System.Web.UI.WebControls.Literal LTCaseStudiesCustomerSolution;
		protected System.Web.UI.WebControls.Literal LTCaseStudiesDetailSolution;
		
		//Resource Manager for localization
		protected ResourceManager LocalizationResourceManager;
				
		private void Page_Load(object sender, System.EventArgs e)
		{
			//Picking literal depending on user login
			//If you want to display the current user name on the browser, uncomment this piece of code
			/*
			if (CmsHttpContext.Current.IsLoggedInAsGuest)
			{
				LTCaseStudiesUser.Text = LocalizationResourceManager.GetString("Guest");				
			}
			else
			{							
				LTCaseStudiesUser.Text = Server.HtmlEncode(CmsHttpContext.Current.User.ClientAccountName);
			}
			*/				
			//This function implements the ValidationCallback mechanism
			CmsHttpCachePolicy.Current.AddValidationCallbackAllCmsContent();
			
			//picking other literals from resource file
			LTCaseStudiesCustomerDescription.Text = LocalizationResourceManager.GetString("CaseStudiesCustomerDescription");
			LTCaseStudiesCustomerSolution.Text = LocalizationResourceManager.GetString("CaseStudiesCustomerSolution");
			LTCaseStudiesDetailSolution.Text = LocalizationResourceManager.GetString("CaseStudiesDetailsSolution");
			//If you want to display the current user name on the browser, uncomment this line of code
			//LTCaseStudiesCurrentUser.Text = LocalizationResourceManager.GetString("CurrentUser");
			
			//Code for Tracing Functionality
			string TracingSeperator = " :: ";
			// Write a line to the Listener
			System.Diagnostics.Trace.WriteLine(System.DateTime.Now + TracingSeperator + "Template" + TracingSeperator + "CaseStudies" + TracingSeperator + "This is the Page Load for the CaseStudies Template.");
			// Record your output
			System.Diagnostics.Trace.Flush();
			//End of Code for Tracing Functionality

		}
		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
			//Creating Instance of the Application Level Resource Manager
			LocalizationResourceManager = (ResourceManager) Application["WoodgroveNetResourceManager"];
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		
		#endregion
		
	}
}
