Auction Demo ASP Scripts: Data Binding

The following APPLET tag uses a modified version of the XML data source object (DSO) that was shipped with Internet Explorer 4.0 to load the XML from an ASP script on the server. The DSO adds the handleUpdate capability for use with the UPDATE.ASP script so that small updates can be sent to each client to keep them all synchronized with the bids that are being made.

<!-- Applet tag to instantiate Data Source Object -->
<APPLET ID="xmldso" CODE="com.ms.xml.dso.XMLDSO.class" MAYSCRIPT WIDTH="0" HEIGHT="0" STYLE="visibility: hidden">
<PARAM NAME="url" VALUE="pdcxml.asp">
<PARAM NAME="cabbase" VALUE="xmldemo.cab#version=1,0,0,7">
</APPLET>

Data binding can then take place using this XML DSO to bind to fields in the currently selected item as follows. The DATASRC attributes point to the XML DSO applet, and the DATAFLD attributes specify which node in the XML to bind to.

<DIV CLASS="details">
<SPAN DATASRC="#xmldso" DATAFLD="MATERIALS"> </SPAN>,
<SPAN DATASRC="#xmldso" DATAFLD="YEAR"> </SPAN>,
<SPAN DATASRC="#xmldso" DATAFLD="DIMENSIONS"> </SPAN>
</DIV>

HomeBack to the XML Auction Demo overview.

© 1997 Microsoft Corporation. All rights reserved. Terms of use.