Can the click function be triggered from a C# application?
Below is the code that defines the function:
$('#connectbtn').unbind('click').attr('disabled', false);
$('#connectbtn').bind('click', function() {
//CODE TO BE EXECUTED
}).removeAttr('disabled');