When thedataAvailable event is raised, I'm able to capturre the event in javascript.
I see that it is sending two arguments with the event. I belive the first argument is the
sender and the second is an empty args value. Please correct me if this is wrong.
<!--
<div><spanid="RES">Some type of test data</span></div>
<atlas:DataSourcerunat="server"id="DataSource1"serviceUrl="~/DataService.asmx">
<dataAvailableHandler="traceDataAvailable1">
</dataAvailable>
</atlas:DataSource>
<scripttype="text/javascript">
function traceDataAvailable1()
{
var obj = arguments[0];
window.document.getElementById("RES").innerText = obj ;
}
</script>
-->
On a related note: you can rewrite traceDataAvailable1() to:
function traceDataAvailable(sender, eventArgs) {
...
}
Also, to display the data in the "res" span, you probably want toiterate over the contents of in the data object and concat it to the"innerHTML" property of the span.
No comments:
Post a Comment