仅限 EPiServer:
如何搜索给定属性中具有任何值的页面?我可以搜索属性中具有特定值的页面,但我不知道如何搜索“非空”。
例如,这不起作用:
var criterias = newPropertyCriteriaCollection
{
new PropertyCriteria()
{
Condition = CompareCondition.NotEqual,
Name = "MyProperty",
IsNull = false,
Type = PropertyDataType.String,
Value = ""
}
};
var pages = DataFactory.Instance.FindPagesWithCriteria(PageReference.StartPage, criterias);
抛出异常,“crieria 值不能为 null 或为空。设置 IsNull 属性以搜索 null。”
有任何想法吗?