You can compare strings with booleans like you may do with apples and computers ( :rolleyes: ).
To fix the issue compare an expression with another of the same type, e.g.
if ( txtRollNumberTxt.Text == String.Empty )
or
if ( String.IsNullOrEmpty(txtRollNumberTxt.Text) == true )
Please note the above code maybe expressed more concisely with
if ( String.IsNullOrEmpty(txtRollNumberTxt.Text) )