Developer forum

Forum » Development » Properties empty with custom module

Properties empty with custom module

Rob Lohmann
Reply
I'm working on a custom module. In the backend i'm able to select a photoalbum which I want to attach to a specific newsitem.

The page load looks like this;
 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        Dim properties As Properties = Dynamicweb.Properties.LoadProperties()

        'Set default values
        'properties.SetDefaultValue("HelloText", "Hi Dynamicweb!")
        'HelloText.Value = properties("HelloText").ToString()

        Dim ddlAlbums As HtmlSelect = CType(Page.FindControl("ddlAlbums"), HtmlSelect)
        Dim albums As INNO_FotoAlbum.INNO_FotoAlbumCollection = INNO_FotoAlbum.INNO_FotoAlbumItem.GetFotoAlbums()
        For Each album As INNO_FotoAlbum.INNO_FotoAlbumItem In albums
            Dim listItem As New ListItem(album.Titel, album.AlbumId.ToString())
            ddlAlbums.Items.Add(listItem)
        Next

        properties.SetDefaultValue("ddlAlbums", "1")

        ddlAlbums.SelectedIndex = properties("ddlAlbums")
    End Sub



In my frontend class i want to do the following;

Dim albumId As Integer = Convert.ToInt32(Properties.Values("ddlAlbums"))

However, the value for 'ddlAlbums' is empty. What is going wrong here and why isn't this value available?



Replies

 
Rob Lohmann
Reply
 never mind, issue is solved already

 

You must be logged in to post in the forum