Rainbow Portal Community

Rainbow Portal forums, blogs, news and more
Welcome to Rainbow Portal Community Sign in | Join | Help
in Search

Error when BindCountry() method is executed. Please help me

Last post 03-25-2009, 6.35 by anthonyraj. 0 replies.
Sort Posts: Previous Next
  •  03-25-2009, 6.35 18052

    Error when BindCountry() method is executed. Please help me

    "NullReferenceException was unhandled by user code"  is the error i get when the first line in the method gets executed in the RegisterFull.aspx page while trying to add new user.

     

    private void BindCountry()

    { //Country filter limits contry list

    /**Error Line****/  string CountriesFilter = portalSettings.CustomSettings["SITESETTINGS_COUNTRY_FILTER"].ToString();

    CountryField.Items.Clear();

    if (CountriesFilter.Length != 0)

    {

    CountryField.DataSource = CountryInfo.GetCountries(CountriesFilter);

    }

    else

    {

    CountryField.DataSource = CountryInfo.GetCountries(CountryTypes.InhabitedCountries,CountryFields.DisplayName);

    }

    CountryField.DataBind();

    }


    With Regards
    Anthony (rajatbics@gmail.com)
    Filed under: ,
View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems