Convert syntax .live() to .on()

Convert syntax .live() to .on()

I have been given a web site by our organization to maintain that uses jQuery 1.7.2 and would like to remove a deprecated function .live() so I can move forward with later versions of jQuery. I have searched the web for changes to the syntax and thought I had figured out the changes I needed(that worked elsewhere) until I came to this line of code. This code is part of a form where input is verified before moving to submission of the form to PayPal. The characters in red have a VS 2013 warning "Variable declaration without an 'As' clause; type of Object assumed." The existing code runs with this warning.

        $('# <%= Button1.ClientID %>').live("click", function () {
            if (DoTrim(document.getElementById('<%=HorseName.ClientID%>').value).length == 0) {
                fields = '1';
                $('#<%=HorseName.ClientID%>').parent().parent().addClass("inputerror_outline");
            }
            if (DoTrim(document.getElementById('<%=HorseUSEFNo.ClientID%>').value).length == 0) {
                fields = '1';
                $('#<%=HorseUSEFNo.ClientID%>').parent().parent().addClass("inputerror_outline");
            }
}

everything I've tried fails to execute the function on the button click.