首页 新闻 会员 周边

关于ServerXMLHTTP的这段asp代码怎么改写放在asp.net里?

0
[已关闭问题] 关闭于 2010-04-28 12:22

看了一天脑袋都浆糊了... 哪位大侠帮我改个例子,让我学习一下.... 现在已经蒙了

   set xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
        xmlHTTP.Open "POST", strPAURL, False
        xmlHTTP.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
        xmlHTTP.send strRequest
        strResponse = xmlHTTP.responseText
        set xmlHTTP = nothing
        
        aryPair = Split(strResponse, "&")
        
        set hstResponse = Server.CreateObject("Scripting.Dictionary")
        
        for each strPair in aryPair
            arySplitPair = Split(strPair, "=")
            hstResponse.Add arySplitPair(0), arySplitPair(1)
        next
        
        strResponseCode = hstResponse.Item("response_code")
        
        if hstResponse.Item("response") = "1" then
            strMessage = "SUCCESS."
        elseif hstResponse.Item("response") = "2" then
            strMessage = "DECLINED"
        end if

................

 

MSXML2.ServerXMLHTTP 和Scripting.Dictionary 都是啥啊.... 看的我这个头晕

前面部分我自己改了一下也不知道改的对不对,不对还请大家指教:

xmlHttp=new ActiveXObject("MSXML2.ServerXMLHTTP");
xmlHttp.open("POST", strPAURL, false);
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlHttp.send(strRequest);
strResponse = xmlHttp.responseText;


后面Scripting.Dictionary的地方就完全迷茫了.....  (┬_┬)

我爱阳光的主页 我爱阳光 | 菜鸟二级 | 园豆:204
提问于:2010-04-22 18:16
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册