I'm using the Events template from the version 5.5 Corporate Site for my version 6 project, and I'm getting the error "CMS.TreeEngine.TreeNode does not contain a definition for DataRow and no extension method DataRow accepting a first argument of type CMS.TreeEngine.TreeNode could be found." Is there alternative code I can use that will work in 6?
Here's the code behind that's causing the error:
using System;
using System.Web;
using CMS.CMSHelper;
using CMS.GlobalHelper;
using CMS.UIControls;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class EventsTemplate : TemplatePage
{
protected const string mDatyField = "EventDate";
protected void Page_Load(object sender, EventArgs e)
{
if ((CMSContext.CurrentDocument != null) && (CMSContext.CurrentDocument.NodeClassName.ToLower() == "cms.bookingevent"))
{
repEvent.Visible = true;
repEvent.Path = CMSContext.CurrentDocument.NodeAliasPath;
object value = DataHelper.GetDataRowValue(CMSContext.CurrentDocument.DataRow, mDatyField);
if (ValidationHelper.GetDateTime(value, DataHelper.DATETIME_NOT_SELECTED) != DataHelper.DATETIME_NOT_SELECTED)
{
EventCalendar.TodaysDate = (DateTime)value;
}
}
}
}