Change string to proper case in an ASP.NET Using C#

Use Namespace
using System.Globalization;

string str="YAMUNANAGAR, HARYANA";

//we result like "Yamunanagar, Haryana"

TextInfo ProperCase= new CultureInfo("en-US", false).TextInfo;

str= ProperCase.ToTitleCase(str.toLower());

 

Related Alrticles

Add Your Business in Free Listing


FREE!!! Registration