To convert a string to proper case we will have to use the System.Globalization namespace.
To do this we will use the following code.
string myString = "VikRAM’s WebSite HaVinG a post oN pRoper cAsE";
TextInfo TI = new CultureInfo("en-US",false).TextInfo;
Response.Write (TI.ToTitleCase( myString ));
[Note: Generally, title casing converts the first character of a word to uppercase and converts the rest of the letters to lowercase.]
Saturday, February 23, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment