Try our conversational search powered by Generative AI!



I'm trying to return pages with a string property starting with a provided letter. if I provide the letter 'A' it returns correct the pages with property A that starts with letter 'A' but only if the second letter isn't also the letter 'A'. Will match on 'Andorra' but not on 'Aalborg'. Any suggestions?

string input = "Aa";
var criterias = new PropertyCriteriaCollection();
var queryCriteria = new PropertyCriteria
Condition = CompareCondition.StartsWith,
                Name = "LastName",
                Value = input,
                Type = PropertyDataType.String,
                Required = true

var pages = DataFactory.Instance.FindPagesWithCriteria(PageReference.StartPage, criterias, CurrentPage.LanguageBranch);


Nov 22, 2011 18:11

Maybe use Truffler? :). I know there´s also LINQ to PageData that might be better to use for this:

Hope this helps.


Nov 22, 2011 19:44

Because of database collation, perhaps? ("Aa may be treated as "Å")

Dec 14, 2011 12:31
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.