请问这段vb代码在.net中怎么实现?
请问这段vb代码在.net中怎么实现?
Function GetURL(url)
Set Retrieval = Server.CreateObject( "Microsoft.XMLHTTP ")
With Retrieval
.Open "GET ", url, false
.setRequestHeader "Content-Type ", "application/x-www-form-urlencoded "
.Send
GetURL = .ResponseBody
End With
Set Retrieval = Nothing
GetURL=bstr(GetURL)
End Function
[解决办法]
<script language= "vbscript ">
Function GetURL(url)
Set Retrieval = Server.CreateObject( "Microsoft.XMLHTTP ")
With Retrieval
.Open "GET ", url, false
.setRequestHeader "Content-Type ", "application/x-www-form-urlencoded "
.Send
GetURL = .ResponseBody
End With
Set Retrieval = Nothing
GetURL=bstr(GetURL)
End Function
</script>