Imports EDSL.Entities
Imports EDSL.DAL
Partial Public Class UserPage
    Inherits BasePage
    Dim objGlobals As New TheGlobals
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim strPageID As String = Request.QueryString("id")
        If strPageID <> "" Then
            Dim objMain As New dbMainUserPage
            Dim objMainEntity As New entUserPage
            objMainEntity = objMain.GetWithCategoryStyle(strPageID)
            If objMainEntity.PageID = "0" OrElse objMainEntity.Active = "0" Then
                Dim objMessage As New dbMainMessage
                divContent.InnerHtml = objMessage.GetMessage(objGlobals.Messages.Invaliduserpage)
            Else
               
                'only display the div if something is in there
                If objMainEntity.BulletList.Trim = "" Then
                    divBulletList.Visible = False
                Else
                    divBulletList.InnerHtml = objMainEntity.BulletList
                End If

                labelPageTitle.Text = objMainEntity.PageTitle
                divContent.InnerHtml = objMainEntity.PageContent

                If objMainEntity.MainImage.ToString() <> "" Then
                    imgProduct.Visible = True
                    imgProduct.ImageUrl += objMainEntity.MainImage.ToString()
                    imgProduct.AlternateText = objMainEntity.PageTitle
                End If

                Me.MetaTitle = ConfigurationManager.AppSettings("BrowserTitleCompanyName") & objMainEntity.MetaTitle
                Me.MetaName = objMainEntity.PageMetaName
                Me.MetaContent = objMainEntity.PageMetaContent

                'Build enquire button
                hplContactUs.NavigateUrl += "?id=" + objMainEntity.PageID.ToString()
                hplContactUs.Text += " " + objMainEntity.PageTitle

                Dim pageInfo As HyperLink = breadcrumb.FindControl("lnkPage")
                pageInfo.Text = objMainEntity.PageTitle

                'Find div on master page
                Master.BodyTag.Attributes.Add("class", objMainEntity.DropDownValue.ToString())



                End If
        End If
    End Sub
End Class
