Skip to content
David Cumps

NSurvey - Belgian Regions

Originally published on my old blog at cumps.be on February 21, 2005.

One of the standard controls of NSurvey is the Country List, which provides a dropdown list of countries. Belgium is one of these countries, but when you select Belgium, it doesn’t display the possible regions for Belgium.

This is because the region information is also implemented with the subscriber model. When the country selection changes, it publishes the selected country to the Region List which then looks up the xml file of the selected country, containing the region information. The problem was that there wasn’t a region file for Belgium. So, I looked up the Belgian regions from Microsoft Passport and created the be.xml file:

<?xml version="1.0" standalone="yes"?>
<nsurveyDataSource xmlns="http://www.nsurvey.org/NSurveyDataSource.xsd">
  <xmlDataSource>
    <runTimeAnswerLabel>Region :</runTimeAnswerLabel>
    <xmlAnswers>
      <xmlAnswer>
        <answerValue></answerValue>
        <answerDescription>[Select Region]</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Antwerpen</answerValue>
        <answerDescription>Antwerpen</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Vlaams-Brabant</answerValue>
        <answerDescription>Vlaams-Brabant</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Hainaut</answerValue>
        <answerDescription>Hainaut</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Liege</answerValue>
        <answerDescription>Liege</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Limburg</answerValue>
        <answerDescription>Limburg</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Luxembourg</answerValue>
        <answerDescription>Luxembourg</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Namur</answerValue>
        <answerDescription>Namur</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Oost-Vlaanderen</answerValue>
        <answerDescription>Oost-Vlaanderen</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>Waals-Brabant</answerValue>
        <answerDescription>Waals-Brabant</answerDescription>
      </xmlAnswer>
      <xmlAnswer>
        <answerValue>West-Vlaanderen</answerValue>
        <answerDescription>West-Vlaanderen</answerDescription>
      </xmlAnswer>
    </xmlAnswers>
  </xmlDataSource>
</nsurveyDataSource>

You May Also Like