How to make case-insensitive?

vbdotnetxt

Newcomer
Joined
Apr 19, 2006
Messages
6
I have this line of code to see if a search term is found in a string:

If (myString.ToString.Contains(searchTermTB.Text))
....

The problem is that the Contains method returns TRUE, sensative to the case. For example First and fIRST are different. How can I make it case insensative?
 
vbdotnetxt said:
I have this line of code to see if a search term is found in a string:

If (myString.ToString.Contains(searchTermTB.Text))
....

The problem is that the Contains method returns TRUE, sensative to the case. For example First and fIRST are different. How can I make it case insensative?

Thanx but I resolved it:

If (myString.ToString.toLower.Contains(searchTermTB.Text.toLower))
 
Back
Top