Imports CharterDotCom.CommonEntities.Library
Partial Class CharterDocumentManagement_VersionImage
    Inherits System.Web.UI.Page

    Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
        If Not DropDownList1.SelectedItem Is Nothing Then
            Response.Write("<TABLE><TR><TD><IMG SRC='_CMSImages/" & DropDownList1.SelectedValue & ".ccom' /></TD></TR></TABLE>")
        End If
    End Sub

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        Dim a As ListItem
        If Not Page.IsPostBack Then
            Dim objContent As CMS.CMSService = New CMS.CMSService
            For Each str As String In objContent.GetImages()
                a = New ListItem
                a.Text = str
                a.Value = str
                DropDownList1.Items.Add(a)
            Next
        End If
    End Sub

End Class
