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????

Re: converting a string in vb.net 80 80

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

Re: converting a string in vb.net 80 80

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 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.