我正在使用Sitecore 8,我为创建表单安装了“Markerter(WFFM)的Web表单”,我创建了自定义类
public class ContactUs : ISaveAction
{
void ISaveAction.Execute(ID formid, AdaptedResultList fields, params object[] data)
{
try
{
var submitFields = new NameValueCollection();
foreach (AdaptedControlResult field in fields)
{
submitFields.Add(field.FieldName, field.Value);
}
Sitecore.Forms.Data.DataManager.InsertForm(formid, submitFields, Sitecore.Data.ID.NewID, null);
}
catch (Exception ex)
{
LogFile("Error" + ex.Message);
}
}
}
但是它给出了错误“名称空间'Sitecore.Forms'中不存在类型或命名空间名称'数据'”