I'm trying to create Web Part properties. Below is my code :
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
namespace SP2010VisualWebPart.AmazingVisualWebPart
{
[ToolboxItemAttribute(false)]
public class AmazingVisualWebPart : WebPart
{
private PrettyColors _textColor = PrettyColors.Black;
public PrettyColors textColor
{
get { return _textColor; }
set { _textColor = value; }
}
private const string _ascxPath = @"~/_CONTROLTEMPLATES/SP2010VisualWebPart/AmazingVisualWebPart/AmazingVisualWebPartUserControl.ascx";
private AmazingVisualWebPartUserControl userControlReference;
protected override void CreateChildControls()
{
Control control = Page.LoadControl(_ascxPath);
Controls.Add(control);
userControlReference = (AmazingVisualWebPartUserControl)control;
userControlReference.SetWebPartReference(this);
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
userControlReference.SetTextColor(this._textColor.ToString());
}
public override EditorPartCollection CreateEditorParts()
{
List<EditorPart> editorParts = new List<EditorPart>(1);
EditorPart editorPart = new AmazingVisualEditorPart.AmazingVisualEditorPart();
editorPart.ID = this.ID + "_EditorPart";
editorParts.Add(editorPart);
return new EditorPartCollection(base.CreateEditorParts(), editorParts);
}
}
}
Below is the error I am getting
The type or namespace name 'List' could not be found (are you missing a using directive or an assembly reference?)
How can i debug this?