首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

请教这段vb代码在.net中如何实现

2012-01-05 
请问这段vb代码在.net中怎么实现?请问这段vb代码在.net中怎么实现?FunctionGetURL(url)SetRetrievalServe

请问这段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>

热点排行