Sign in | Join
Last post 09-20-2006 6:13 AM by FCsteve. 5 replies.
Sort Posts: Oldest to newest Newest to oldest
hi all,
I want to change the textbox1.text into lower or upper case. and store that string in DB.
Hi,
you can do it like:
string data = TextBox1.Text.ToUpper(); or you can use ToLower(). There are a lot of handy methods on the String class.
Grz, Kris.
Hello XIII,
This is working thanks,
one more thing if i want only first character change in upper case like:- petter son or PETTER SON change in Petter Son
regard
waiting for response
That would be the StrConv function.
MyString = StrConv(MyString, VbStrConv.ProperCase)
FCsteve:MyString = StrConv(MyString, VbStrConv.ProperCase)
Be aware that this method is only available in the Microsft.VisualBasic namespace. If you want to use it with C# you'll need to reference the assembly in your project.
Edit, or you can use
System.Globalization.TextInfo
Which has a method called ToTitleCase
You may have to 'new' an instance up to use it, never used it but just had a look for a c# version and this should do the same.