Dynamic page updates using XMLHTTP
Dynamic page updates using XMLHTTP
"... show you how to use XMLHTTP to update a portion of a Web page with data from a Microsoft ASP.NET Web service without doing a post back. This is going to be really cool! Trust me.
Back to the top
General overview
XMLHTTP works by sending a request to the Web server from the client and returning an XML data island. Depending on the structure of the XML that is received, you can use XSLT or the XML DOM to manipulate it and bind portions of the page to that data. This is an extremely powerful technique.
Note Microsoft does offer a Web Service behavior for Internet Explorer that makes asynchronous calls to ASP.NET Web services quick and easy. However, this behavior is not supported and it's not the best way to update a page asynchronously. You should use XMLHTTP instead!
In the example I'll work through in this column, I will make three Web service calls to an ASP.NET Web service through XMLHTTP. The Web service will query the Northwind database on the local SQL Server and will return a DataSet to the client in the form of an XML diffgram. I will then use the XML DOM to parse that XML data and dynamically update portions of my page. All of this will be done without a post back. ..."
AJAX the MS way...
Looks like what I've been doing for a while, but nice to see it in print... What is new to me is how a SOAP end point is used (I use a custom ASP page that emits XML).
(via KBAlerts)
No comments:
Post a Comment