My website has it's own list of Coutries, held in a .txt file. For forms that offer a Country drop-down list, I read each line of the text file and populate an <asp:dropdownlist> with the values.
Now that I'm using NetSuite as the data source for my website, I'd like to make use of the enum Country, if possible. What I'd need is a list of the Names and Values of each country, i.e. "Afghanistan" and "_afghanistan".
Possible?
I've tried the follow two set of code, but both return only the _ value, not the display name. Am I doing something wrong, or is this just not possible? I know that within NetSuite when you look at a country list you see "Brazil" and not "_brazil", so can that functionality be replicated outside of NetSuite?
foreach (string country in Enum.GetNames(typeof(NetSuite.NetSuiteAPI.Country))) { Response.Write(country.ToString() + "&lt;br&gt;"); } -- OR -- foreach (NetSuite.NetSuiteAPI.Country country in Enum.GetValues(typeof(NetSuite.NetSuiteAPI.Country))) { Response.Write(country.ToString() + "&lt;br&gt;"); }My second question is how to work with States with Web Services APIs. My NetSuite contact who's setting up our enviroment wants to leave the "allow free-form states in addresses" option UNchecked. If that's the case, how I can replicate NetSuite, in that if you select the country "United States" the State select list automatically shows US states, and if you change to "United Kingdom" the State list changes to show counties, but if you change country to be "Uruguay" then the State field becomes a free-form text input box. is this one possible, or must I have "free form states" checked?ThanksKevin