Please declare the two variables out side the function like below
var contactName ="";
var contactNo = "";
$('#btnsave').click(function () {
contactName = $('#<%=txtContactName.ClientID%>').val();
contactNo = $('#<%=txtContactNo.ClientID%>').val();
$('#LoadingPanel').show();
});
Hope this helps