How to convert the string to uppercase before performing a compare, or is it possible to compare the string by ignoring the case
if (Convert.ToString(txt_SecAns.Text.Trim()).ToUpper() ==
Convert.ToString(hidden_secans.Value).ToUpper())
use this:
var result = String.Compare("AA", "aa", StringComparison.OrdinalIgnoreCase);