con vb.net non saprei aiutarti, se invece si tratta di jquery è semplice, ti riporto il codice:

codice HTML:
$("#txt").blur(function() {
     $(this).css("background-color", "white");
     var num = parseInt($(this).val());
     if (num > 2) $(this).css("background-color", "red");
})