I suspect what is happening is that your ID's are getting mangled when the page is server side rendered by ASP.
you are most likely going to have to change your javascript to look something like...
'<%= txt1.ClientID %>'
$("#<%= BtnSubmit.ClientID %>").click(function() {
if ($("#<%= txt1.ClientID %>").val() == '' || $("#<%= TextBox1.ClientID %>").val() == '' || $("#<%= TextBox2.ClientID %>").val()) {
$("#<%= txt1.ClientID %>").effect("shake")
}
});
for an example of shake the following should help:
http://api.jqueryui.com/shake-effect/[
^]