top button
Flag Notify
Site Registration

how to find exact string in asp.net

+2 votes
297 views

mango = mango
true

posted Oct 14, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

You can use String.Compare method following is the syntax -

Compare (strA as string, strB as string, ignoreCase as boolean) 

Return value

Zero - strA equals strB.
Less than zero - strA is less than strB.
Greater than zero - strA is greater than strB.

Let me know if your are looking something different.

answer Oct 15, 2014 by Salil Agrawal
thank you sir
can you please describe it with a example
Please follow http://msdn.microsoft.com/en-us/library/zkcaxw5y(v=vs.110).aspx and let me know if still not clear.
Similar Questions
+1 vote

This example shows you how to check given input contains only numbers (digits) or not using regular expression in asp.net and c#.

Regular expression
string strRegexpNumber = @"^[0-9 ]*$";

...