Tuesday, January 6, 2009

How to convert strings to lower, upper, titlecase

string str = "xploReDOtneT wElcomeS yOU";

Response.Write("Orginal Text:- " + str + "
Lower :- " + str.ToLower() + "
" + "Upper :- " + str.ToUpper() + "
" + "Title Case :- " + System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(str));



OUTPUT



Orginal Text:- xploReDOtneT wElcomeS yOU

Lower :- xploredotnet welcomes you

Upper :- XPLOREDOTNET WELCOMES YOU

Title Case :- Xploredotnet Welcomes You

No comments: