Is it possible to look for documenttype and loop through results when creating usercontrol Options
tim
Posted: Wednesday, March 28, 2007 2:26:18 PM

Rank: Addict

Joined: 2/19/2007
Posts: 825
Location: Belgium
Hi,

I am creating a user control with populates a dropdownlist with a certain documenttype.

I have referenced the umbraco.dll

What do i do now ?

Greets,

Tim

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
tim
Posted: Wednesday, March 28, 2007 2:39:24 PM

Rank: Addict

Joined: 2/19/2007
Posts: 825
Location: Belgium
I did it like this, don't know if this is the recommended way ?

Code:


foreach (XmlNode tempNode in content.xmlContent.GetElementsByTagName("node"))
            {
                if (tempNode.Attributes["nodeTypeAlias"].Value == "CentrumPage")
                {
                    ddCentrums.Items.Add(tempNode.Attributes["nodeName"].Value);
                }
            }



Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.