I am having a database table which stores customers information which includes cutomers country as a column.now i want to convert the customer's country as a single word for example f a customer belong to united states i want to convert it as 'us' and want to dispaly it in my vb.net page how to achieve this????

Recommended Answers

All 2 Replies

Use a Dictionary(Of String, String), make the key the long name and the value the abbreviation.

I would recommend you store the country code in your table as well in front of country name(or in a separate table and link them). Your life will be easier. Just fetch the country code from the table corresponding to the country name.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.