I am trying to create a web part for the rad rotator. After much trial and error I have managed to create the web part and get it to come up in the server gallery.
When I try and drag and drop the web part onto a new page I get the following error:
The "RotatorWebPart" Web Part appears to be causing a problem. RadRotator: You have not specified a template OR there is problem with your databinding expression (possibly you haven't specified a datasource or content file).
I'm not sure what this error means? The webpart I have created simply wraps the RadRotator.Net2.dll into the class.
My Complete code and confirguration is below. Any help would be appreciated.
Thanks
[RadRotatorWebPart.cs]
using
System;
using System.Collections.Generic;
using System.ComponentModel;
using
System.Text;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Telerik.WebControls;
using
Microsoft.SharePoint;
using
Microsoft.SharePoint.Utilities;
using
Microsoft.SharePoint.WebPartPages;
using
System.Xml.Serialization;
namespace
RadRotatorWebPart.WebParts
{
[
XmlRoot(Namespace = "RadRotatorWebPart.WebParts")]
public class RotatorWebPart : Microsoft.SharePoint.WebPartPages.WebPart
{
private RadRotator radRotator;
override protected void CreateChildControls()
{
radRotator =
new RadRotator();
radRotator.ID =
"RadRotator1";
this.Controls.Add(radRotator);
}
protected override void RenderWebPart(System.Web.UI.HtmlTextWriter output)
{
EnsureChildControls();
RenderChildren(output);
}
}
}
In my web part file I have added the sharepoint dll reference:
Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL
And I have also Referenced the RadRotator.Net2.dll:
RadRotator.Net2, Version=2.7.1.0, Culture=neutral, PublicKeyToken=de81a6506e5a433a, processorArchitecture=MSIL