Code Samples

Code Samples

Convert First letter of each word in a string to upper case–ASP.NET

If you want to convert the first letter of each word in a sentence to capital letter, what we did earlier was to split the string to words, change starting letter of each word to Upper case and then join them. This will be helpful when you display names.

Here is a simplest way to do that in ASP.NET



string sample = "hello world";


Hello World

blog comments powered by Disqus