More in this section

Forums / Bugs & Issues / Case sensitivity

Case sensitivity

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    16 Dec 2010
    Link to this post
    I'm trying to do a contains query on the page title, but it's only returning me the results if I match the case

    var pages = App.WorkWith().Pages()
                        .Where(x => x.Title.Contains(searchValue) && x.ShowInNavigation == true)

    How should I be doing this?

    (Like if a page name is "Main", searching for "main" gives me nothing.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    17 Dec 2010
    Link to this post
    Hi Steve,

    You can use String.ToLower() method and create a local variable that you should pass the the query.

    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered