I have to support some aspx pages and I'm pretty new to apsx. In the below case allWOs = "false", and ends up being passed to a method expecting a Boolean. How need to convert a string to Boolean? Is the below proposed a viable way to do it?
Code:
var allWOs = "<%= allWorkOrders %>";
BillingWork.MovePeriod(allWOs, MovePeriod_Callback);
Error:
Unable to cast object of type 'AjaxPro.JavaScriptString' to type 'AjaxPro.JavaScriptBoolean'.
Proposed:
var allWOs = $("#<%= allWorkOrders %>").val() != null ? $("#<%= allWorkOrders %>").prop('checked') : false;