I want to have the first letter become a capital letter ex: message ---> Message please show a easy way Thanks
Hi, you can try this: using System.Globalization; ... string strTest = "change the first letter of each word of this text to uppercase."; TextInfo strTI = new CultureInfo("en-US", false).TextInfo; strTest = strTI.ToTitleCase(strTest);
a="message" a=trim(a) ' replace space first_letter=left(a,1) other_letters=right(a,len(a)-1) first_letter=[b]ucase[/b](first_letter) result=first_letter&other_letters response.write result ' Message Code (markup): I am using this technique at my emlak site here is link http://www.emlakset.com/main.asp?cat=1
<% Dim a a = "message" a = Ucase(Mid(a, 1, 1)) & Mid(a, 2) Response.Write a %> Code (markup): or if you want a function: <% Function capitalize(strText) capitalize = Ucase(Mid(strText, 1, 1)) & Mid(strText, 2) End Function %> Code (markup):