这是什么语言?是VB吗?能详细解释下吗?最好整成C#<%
url=request("url")
body=xmlHttp("http://www.flvxz.com/getFlv.php?url="&url&"", "utf-8") 
Body = Replace(Body,"<a href='http://www.flvxz.com/guestbook/'>报告该错误</a>","")
response.write BodyFunction xmlHttp(sUrl, sCharSet) 
On Error Resume Next 
Dim xml: set xml = Server.CreateObject("Microsoft.XMLHTTP") 
xml.Open "GET", sUrl, False 
xml.setRequestHeader "Content-Type", "text/html;charset=" & sCharSet 
xml.Send() 
If Err.Number <> 0 Then 
xmlHttp = "" 
Exit Function 
End If 
If xml.readyState = 4 Then 
xmlHttp = BytesToBstr(xml.responseBody, sCharSet) 
End If 
End Function Function BytesToBstr(cnvUni, sCharSet) 
On Error Resume Next 
Dim objStream: set objStream = Server.CreateObject("adodb.stream") 
With objStream 
.Type = 1 
.Mode = 3 
.Open 
.Write cnvUni 
.Position = 0 
.Type = 2 
.Charset = sCharSet 
BytesToBstr = .ReadText 
.Close 
End With 
End Function
%>

解决方案 »

  1.   

    我是楼主,那把它写在VBScript中(后缀名vbs),C#WinForm中能引用吗?
      

  2.   

    +1
    随便研究研究Ajax就可以了啊
    不是转化成C# ,准确的说应该是转化Javascript更合适
    C#本身没有Ajax都是要注册一些JS的
      

  3.   

    那把它写在VBScript中(后缀名vbs),C#WinForm中能引用吗?
      

  4.   

    这不能算是AJAX。AJAX脚本是运行在客户端的,楼主的代码是运行在服务器端的。
    ASP是脚本驱动的解释类语言。属于上一代的产品,和.NET没有直接关系。在ASP.NET中,类似的做法是服务端的代码调用WebService或者WCF服务。从代码逻辑来看,楼主的代码似乎完全没有必要放在服务器端,除非是想隐藏真实的服务(http://www.flvxz.com/getFlv.php),仅做做服务代理。