Saturday, October 22, 2011

InitCap in asp.net

Below is the line of code for rendering text in InitCap format.

System.Globalization.CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(txtName.ToString().ToLower())

Here the source string should be in lower case.

Happy coding…

No comments:

Post a Comment