/// ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
/// ' 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;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Drawing;

//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;
using Microsoft.ContentManagement.Web.Caching;
//Add reference to the Mcms control library
using McmsWebControlLibrary;

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

	
		protected System.Web.UI.WebControls.Literal LTHomeCurrentUser;
		protected System.Web.UI.WebControls.Literal LTHomeUser;

		//Resource Manager for localization
		protected ResourceManager LocalizationResourceManager;
		
		#region Public Properties
		protected Table tblPressRelease;
		#endregion Public Properties

				
		#region Page Load
		private void Page_Load(object sender, System.EventArgs e)
		{
			//If you want to display the username on the browser, uncomment this piece of code.
			/*
			if (CmsHttpContext.Current.IsLoggedInAsGuest)
			{
				LTHomeUser.Text = LocalizationResourceManager.GetString("Guest");				
						
			}
			else
			{							
							
				LTHomeUser.Text = Server.HtmlEncode(CmsHttpContext.Current.User.ClientAccountName);
							
			}
			*/
			
			//This function implements the ValidationCallback mechanism
			CmsHttpCachePolicy.Current.AddValidationCallbackAllCmsContent();

			//If you want to display the username on the browser, uncomment this line to code.
			//LTHomeCurrentUser.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 + "Home" + TracingSeperator + "This is the Page Load for the Home Template.");
			// Record your output
			System.Diagnostics.Trace.Flush();
			//End of Code for Tracing Functionality

		} //Close Page_Load
		#endregion Page Load
		
		#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);
			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
	}
}
