Load data from
Centralpoint module into data table and loop over the data
string name = "NewsExample";
CpContent content = CpContent.GetCache(name, SystemFilterOptions.Enabled);
if (content == null)
{
content = new CpContent(name, SystemFilterOptions.Enabled);
content.AddRelation("News", "StartDate, EndDate, Title", "StartDate DESC ");
content.InsertCache();
}
DataTable dt = content.Relation("News");
foreach (DataRow dr in dt.Rows)
{
lbRecords.Text += (string)dr["Title"] + "<br>";
HttpContext.Current.Trace.Write(String.Format("Title: {0} StartDate: {1}", dr["Title"], dr["StartDate"]));
}
Keywords: retrieve data from the module, module
Related CodeSamples Records