| Author: Reach2Shaik 07 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi,
make both the strings to upper or lower and compare.
To make str to Upper case str = str.ToUpper();
To make str to Lower case str =str.ToLower();
Don't forget to rate this answer, if it is helpful... Regards Shaik
|
| Author: Deepika Haridas 07 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Hello,
You can write
string str = "This is an example"; CompareInfo ci = CultureInfo.CurrentCulture.CompareInfo; if (ci.IndexOf(str, "ExaMple", CompareOptions.IgnoreCase) > 0) { Response.Write("Ok"); } else Response.Write("Wrong");
Thanks & Regards, Deepika Editor
If U want to shine like a SUN..First U have to burn like the SUN!! Need a Guide? Join my mentor program..
|
| Author: Priyank 07 Nov 2009 | Member Level: Bronze | Rating:  Points: 2 |
hi,
use String.contains(string value) , to finding specific word in line and put logic for case ignore you own way.
Because it is faster then IndexOf or any another method.
refer this link:
http://stackoverflow.com/questions/498686/net-is-string-contains-faster-than-string-indexof
Thanks Priyank Maheta
|
| Author: Shivraj Singh Rajawat 07 Nov 2009 | Member Level: Bronze | Rating:  Points: 2 |
use following code to compare strings......
String str="example";
if(str.ToUpper().Contains("EXAMPLE")) Response.Write("String contains EXAMPLE"); else Response.Write("String does not contains EXAMPLE");
|
| Author: Nikhil Gaur 07 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
use this statement
str.ToUpper().Contains("EXAMPLE");
Join this campus group http://www.dotnetspider.com/sites/637/-ecb-aspdotnet.aspx
Thanks & Regards NIks My Software and Web Development Experience
|
| Author: Arun K 09 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
Got teh answer...
Thx buddies
Regards: Arun K .NET Developer http://aruninnice.blogspot.com/ Bangalore Do not forget to Rate the post...
|