Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8213485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:08:05+00:00 2026-06-07T11:08:05+00:00

I am using this filter in my AutoCompeteBox. bool SearchBird(string search, object value) {

  • 0

I am using this filter in my AutoCompeteBox.

bool SearchBird(string search, object value)
        {
            if (value != null)
            {
                AllBirds datasourceValue = value as AllBirds;
                string name = datasourceValue.primary_language;

                if (name.ToLower().StartsWith(search.ToLower()))
                return true;

            }
            // If no match, return false. 
            return false;
        } 

Everything is working well when all entries have some value, but when there is any empty record it’s crushing giving an error with null exception (which is understandable as there is no value). Tried do smth with extra if or else statement but still getting the same error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:08:06+00:00Added an answer on June 7, 2026 at 11:08 am

    more better if u use if else?

    add this after if, may be help

    else {
     return false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this line in a SPARQL query in my python program: FILTER regex(?name,
I need to filter the value like this 100.50 using filter_var in PHP. Now
i need to filter a TClientDataset , actually i'am using this code. if Value<>''
I m un-animating a list using this code... function unanimate_li() { $li.filter(':last') .animate({ height:
Using this tutorial at section 5.5, I attempted to Assign the 'celsius' string attribute
I am using this function to filter query results that are older than 60
I'm currently using this code: var gallery = $('ul#gallery').children(); $(gallery).filter(':even').not(':last').hover(function () {$(this).toggleClass('next')}); I'm trying
Currently I'm using this code to create a custom filter: var fName = new
I am looking for a nice quick live search/filter. Anybody use this? http://rikrikrik.com/jquery/quicksearch/#usage Also
I am using this property file to setup log4j in Spring: log4j.appender.EMAIL=org.apache.log4j.net.SMTPAppender log4j.appender.EMAIL.filter=org.apache.log4j.varia.LevelRangeFilter log4j.appender.EMAIL.filter.levelMin=FATAL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.