Recommended: Some words for ASP and ASP programmers During this period, there have been better discussions about the future of Asp and the quality of Asp. Of course, everyone's hearts are good, but what some friends said is really depressing. Personally, I think that within two years, Asp will be used on many small and medium-sized enterprise B/S systems.
| The following is the quoted content: <% Class aspxsky_page Private Sub class_initialize End Sub Public Function Alert(message,gourl) message = replace(message,',/') If gourl=-1 then Response.Write (<script language=javascript>alert(' & message & ');history.go(-1)</script>) Else Response.Write (<script language=javascript>alert(' & message & ');location=' & gourl &'</script>) End If Response.End() End Function Public Sub showpage(str,page,url) if not isnumeric(page) then alert prompt: Incorrect parameter!,-1 end if if page= or page=0 or isnull(page) or isempty(page) then page=1 else page=cint(page) end if str=split(str,{nextpage}) abspage=page pcount=ubund(str) 1 if page>cint(ubund(str) 1) or page<1 then alert prompt: Incorrect parameter!,-1 else response.write str(page-1)&<br><br><center> is divided into &pcount& pages end if for p=0 to ubund(str) response.write <a href=&url&p=&p 1&>[&p 1&]</a> next response.write Current &abspage&/&pcount& page</center> End Sub End Class '----------------------------------------------------------------------------------------------------------------------------- p=request.QueryString(p) str=Page 1: Here is the content of the first page {nextpage}Page 2: Here is the content of the second page url=shownews.asp?id=&id&& set newpage=new aspxsky_page newpage.showpage str,p,url %> |
Share: ASP Tutorial: Ideas for querying and paging without connecting to the database After reading a lot of introductions, I know that the execution efficiency of set rs=conn.execute(sql) is much higher than that of rs.open sql,conn,1,1, but the execution method of set rs=conn.execute(sql) also has many shortcomings. First of all, it does not have pagination attributes, such as rs.pagesize,rs,a