Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Get Country name from countryID View modes: 
User avatar
Member
Member
Runey - 11/13/2009 11:06:26 AM
   
Get Country name from countryID
Hi,

In C#, I've got an AddressInfo object, which provides me with the address details and the countryID.

Anybody please able to advise how I can pull the country name (in the code) from the countryID?

I suppose the name will be stored in a resourcehelper or something?

Thanks

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 11/14/2009 1:57:39 AM
   
RE:Get Country name from countryID
Hi,

You can use following method to get CountryInfo object from your CountryID

CMS.SiteProvider.CountryInfoProvider.GetCountryInfo(int countryId)

I hope this will help you.

Best regards,
Miroslav Remias.

User avatar
Member
Member
Runey - 11/16/2009 3:20:36 AM
   
RE:Get Country name from countryID
Thank you.
This works!