
Partial Class Visitors_AboutCharter
    Inherits CharterCMSPage

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        MyBase.SetTemplate(3)

        Dim item As NonProductItem

        If Not IsPostBack Then
            Response.AddCacheItemDependency(CacheKey.OutputCacheDurationKey)

            Dim d As DateTime = CachedControls.getExpireDate()

            If HttpContext.Current.Cache.Item("Template3") Is Nothing Then
                HttpContext.Current.Cache.Insert("Template3", DateTime.Now, Nothing, d, System.TimeSpan.Zero, System.Web.Caching.CacheItemPriority.NotRemovable, Nothing)
            End If

            Response.AddCacheItemDependency("Template3")

            If Application(Request.Url.LocalPath) Is Nothing Then
                Application.Add(Request.Url.LocalPath, "Template3")
            End If

            If Request.QueryString(QueryStringName.NonProductItem) Is Nothing Then
                ltrTitle.Text = String.Empty
                ucLocalNavigation.SubItem2 = NonProductItem.Unspecified
                ucCustomContent.ContentKey = String.Empty
            Else
                item = CType(Request.QueryString(QueryStringName.NonProductItem), NonProductItem)

                Select Case item
                    Case NonProductItem.AboutCharter
                        ltrTitle.Text = "About Charter"
                    Case NonProductItem.AboutCharterLeaders
                        ltrTitle.Text = "Leadership"
                    Case NonProductItem.AboutCharterMarkets
                        ltrTitle.Text = "Markets"
                    Case NonProductItem.AboutCharterEducation
                        ltrTitle.Text = "Education Outreach"                        
                    Case NonProductItem.AboutCharterAdvertising
                        ltrTitle.Text = "Cable Advertising"
                    Case NonProductItem.AboutCharterCareers
                        ltrTitle.Text = "Charter Your Career"
                End Select

                ucLocalNavigation.SubItem2 = item
                ucCustomContent.ContentKey = item.ToString()

            End If
        End If
    End Sub

End Class
