大家能帮我把这段话从asp翻译成asp.net(C#)吗?谢谢,本人只会后者 谢谢先
<%
Sub TimeDelaySeconds(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub
TimeDelaySeconds(0)
%>
<%
Response.Expires = -9999
Response.AddHeader "Pragma ", "no-cache "
Response.AddHeader "cache-ctrol ", "no-cache "
Response.Charset = "GB2312 "
Set conn = Server.CreateObject( "ADODB.Connection ")
connstr= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath( "Database.mdb ")
conn.Open connstr
%>
<%
set rs = server.createobject( "adodb.recordset ")
Sqlstr = "select * from UserData order by id "
rs.open Sqlstr,conn,1,1
rs.PageSize = 3
AllPage = rs.PageCount
Page = request.QueryString ( "page ")
'***********************判断
if cint(page) = < 1 then
Page = 1
elseif cint(page) > = rs.PageCount then
Page = rs.PageCount
else
intpage = cint(page)
end if
'***************************
rs.AbsolutePage=page
Response.write AllPage& ", "&rs.AbsolutePage& ", "
for i = 1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
Response.write rs(0)& ", "&rs(1)& ", "&rs(2)& ", "&rs(3)& ", "
rs.movenext
next
rs.close
Set rs = nothing
%>
该文章转载自脚本之家:http://www.jb51.net/html/200611/5/4896.htm
------解决方案--------------------沙法,,帮顶
------解决方案--------------------帮忙顶
------解决方案--------------------会,就是不帮你转
你要是哪儿看不懂可以帮你解释~
------解决方案--------------------呵呵!
好象有转换的工具 !
上网找找看!
vb.net转换成c#的就有!
asp的没试过!不过楼主可以找找看!