谁能把这段asp代码转成c#的....

reddust 2003-05-23 08:58:13
<%
rem 用于取得QQ的URL
Function GetURL(url)
on error resume next
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "GET", url, False, "", ""
.Send
GetURL = .ResponseText
End With
Set Retrieval = Nothing
if err.number<>0 then err.clear
End Function
%>
<%
function qq_online(qq)
if qq<>"" then
on error resume next
Dim T,Start,Length,QQURL
T=GetURL("http://search.tencent.com/cgi-bin/friend/oicq_find?oicq_no="&qq&"")
Start=Instr(1,T,"ShowResult("+chr(34))
Start=Instr(Start,T,"http://")
Length=Instr(Start,T,chr(34)+","+chr(34))-Start
QQURL=Mid(T,Start,Length)
response.write "<a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&qq&" target=_blank title=QQ:"&qq&"><img src="&QQURL&" width=16 height=16 border=0></a>"
'response.write "<a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln="&qq&" target=_blank title=QQ:"&qq&"><img src=image/oicq.gif width=16 height=16 border=0></a>"
if err.number<>0 then err.clear
else
response.write "<img src=image/oicq.gif width=16 height=16>"
end if
end function
%>
...全文
75 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
ideasky 2003-06-07
  • 打赏
  • 举报
回复
mail给我,我发给你!!
grooving 2003-05-25
  • 打赏
  • 举报
回复
用webrequest类,或是GetURL函数不变.用.net去得到responsetxt
仙人掌 2003-05-25
  • 打赏
  • 举报
回复
function funcName(String)
....
end function


---->>

string void funcName(string string)
{
...
}

Response.Write "...."
---->>
Response.Write("....")

if ..... then
...
end if

--->>>
if(...)
{
...
}
reddust 2003-05-25
  • 打赏
  • 举报
回复
各位大虾,帮帮忙!
reddust 2003-05-24
  • 打赏
  • 举报
回复
问题是我看不懂vbscript。。
caoit 2003-05-23
  • 打赏
  • 举报
回复
这样也行,自己改吧,
cmsoft 2003-05-23
  • 打赏
  • 举报
回复
you can use WebRequest and WebResponse

62,266

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧