Convert a string to Proper Case

Posted on September 24, 2008. Filed under: ASP.net |

Use the namespace System.Globalization
VB.NET
Dim myString As String = “syncFusion deVeloPer sUppOrt”
‘ Creates a TextInfo based on the “en-US” culture.
Dim TI As TextInfo = New CultureInfo(”en-US”, False).TextInfo
Response.Write(TI.ToTitleCase(myString))

C#
string myString = “syncFusion deVeloPer sUppOrt”;
// Creates a TextInfo based on the “en-US” culture.
TextInfo TI = new CultureInfo(”en-US”,false).TextInfo;

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

Make a Comment

Make A Comment: ( None so far )

You must be logged in to post a comment.

  • Tags

Liked it here?
Why not try sites on the blogroll...