Hi,
I've searched high and low for some resolution to this problem. Hopefully someone here can explain!!
I create a usercontrol that uses .NET web controls, but I want to create a smoother user experience by avoiding full postbacks, so I write some JQUERY to capture click events on the client and in this way do the processing without going back to the server.
$("#tblLedgerEntries :checkbox").click(function () {
var value1 = $(this).closest("tr").find("td.invoiceAmount").html();
var value2 = $('#<%=hdnTotalToPay.ClientID%>').html();
CalculateTotalPayable(value1, value2, $(this).attr("checked"));
});
All fine. Now someone comes to my site with javascript DISABLED. Let's assume I can detect whether javascript is enabled or otherwise. In this situation I will need to do the calculations I was doing on the client on the server which means I need to trigger a postback....
How do I do this.....I only want to trigger a full postback if javascript is disabled. I want to use the client script if javascript is enabled. If this is applying to checkboxes (UI recalculates a payable amount each time a user clicks a row checkbox), the only way I can see to trigger a postback is by using AutoPostBack=True....but this will always do a postback regardless of the client script.....arghhh.
Anyone know how to do this....or am I approaching this from the wrong angle?!??
Kind Regards
Richard