Sitefinity Find Generic Content By Name

Posted on: Mon Aug 16 13:49:18 -0700 2010. Updated on: Mon Aug 16 13:50:29 -0700 2010.
Category: Telerik Controls and Sitefinity

Find a generic content item in sitefinity by it's name and access the text...

using Telerik.Cms.Engine;
...

ContentManager contentMngr = new ContentManager();
IContent wordOfDay = contentMngr.GetContent(WordOfDayContentItem);
if (wordOfDay != null)
{
	LabelWordOfTheDay.Text = wordOfDay.Content as string;
}

Comments:

Add a Comment:

simple_captcha.jpg
(human authentication)


Ads

Categories

About

Random foliage

This website is meant to be a reference for ASP Dot Net developers. The entries are a compilation of things I've figured out how to do and that I deem useful to keep of track for future reference. Assumptions: web development with: C Sharp (vb sucks), visual studio 05/08, .net 3.5, meant for programmers. Written by: James Reategui.