Wednesday, July 23, 2008

Convert a string to Proper Case

Convert a string to Proper Case
===========================

// Use this Namespace
using System.Globalization;

// Code
string myString = "thIS is tHE sAmple tExt to shoW tHIs examPle !!";

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

Response.Write (TI.ToTitleCase( myString ));

No comments: