1. XMLHTTP
这种方法意思和 RDS 差不多,但在 XML 时代,这种方法显得比较正经儿。
网上有个比较好的例子:http://www.asptoday.com/articles/20001219.htm
Using Fat Clients For E-commerce
作者起这个名字 (Fat client) 就是说要求 browser 要支持 XMLHTTP。
代码片断:
Function getCategories()
Dim oXMLHTTP ' As Object
Dim oCategories ' As Object
Set oXMLHTTP = CreateObject("Microsoft.XMLHTTP")
'--- set the XMLHTTP call and issue send (no parm as category
'--- is included in URL
oXMLHTTP.open "GET",SERVER_PATH & "demo.asp?action=getcategories",False
oXMLHTTP.send
'--- load the response into the Categories data island
dsoCategories.loadXML oXMLHTTP.responseText
'--- transform into HTML and assign to innerHTML property
divCategories.innerHTML = dsoCategories.documentElement.transformNode(dsoCategoriesXSL.documentElement)
'--- tidy up the object
Set oXMLHTTP = Nothing
End Function