易截截图软件、单文件、免安装、纯绿色、仅160KB

ASP长文章内容自动分页函数

<%
Const maxPagesize=1000     '设置分页字数
Function InsertPageBreak(strText)
Dim strPagebreak,s,ss
Dim i,IsCount,c,iCount,strTemp,Temp_String,Temp_Array
strPagebreak="[hiweb_break]"
s=strText
If Len(s)<maxPagesize Then
   InsertPageBreak=s
End If
s=Replace(s, strPagebreak, "")
s=Replace(s, "&nbsp;", "<&nbsp;>")
s=Replace(s, "&gt;", "<&gt;>")
s=Replace(s, "&lt;", "<&lt;>")
s=Replace(s, "&quot;", "<&quot;>")
s=Replace(s, "&#39;", "<&#39;>")
If s<>"" and maxPagesize<>0 and InStr(1,s,strPagebreak)=0 then
   IsCount=True
   Temp_String=""
   For i= 1 To Len(s)
    c=Mid(s,i,1)
    If c="<" Then
     IsCount=False
    ElseIf c=">" Then
     IsCount=True
    Else
     If IsCount=True Then
      If Abs(Asc(c))>255 Then
       iCount=iCount+2
      Else
       iCount=iCount+1
      End If
      If iCount>=maxPagesize And i<Len(s) Then
       strTemp=Left(s,i)
       If CheckPagination(strTemp,"table|a|b>|i>|strong|div|span") then
        Temp_String=Temp_String & Trim(CStr(i)) & ","
        iCount=0
       End If
      End If
     End If
    End If
   Next
   If Len(Temp_String)>1 Then Temp_String=Left(Temp_String,Len(Temp_String)-1)
   Temp_Array=Split(Temp_String,",")
   For i = UBound(Temp_Array) To LBound(Temp_Array) S


相关文档:

ASP循环输出表格行tr的方法

  <%
for i=1 to rs.recordCount '变量i从1循环到数据库中的全部记录数
if (i mod 1 =1) then '每个tr即每行显示1个记录,可根据需要自行修改, 将左边的1修改为2即显示两行。
response.write "<tr align='center'>"
end if
%>
此处为要循环的内容
  <%if (i mod 1 = 0) then ......

asp连接access数据例子

<%Dim connstrconnstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Stu.mdb")
Set bb = Server.CreateObject("ADODB.Connection")
bb.Open connstr%>
<html>
<head>
<meta http-equiv="content-Language" content="zh-cn" />
<meta http-equiv="Content-Type ......

ASP返回错误页和http状态查询工具

 IIS默认的错误页是很不友好的,很多人看到默认的错误页时都会说:网站打不开了!白白损失了这部分流量。而如果错误页直接跳转到首页又对搜索引擎很不友好,搞不好首页还会被封掉。所以根据情况,有两个方法解决这个问题:
  如果是博客等内容型的网站,可以返回一个带有404错误的搜索框让访客搜索,若是电子商务型网站 ......

asp .net 页面回车触发button 按钮事件

1。深层次来说这不是asp.net 的问题,而是html form 的submit 按钮就是如何设计。
当你的光标焦点进入某个表单元素的时候,会激活该表单的第一个(
流布局顺从左到右,从上至下)
type=submit 的按钮(假如有),等待响应回车事件,并提交该form
你可以测试一下代码
<form action="">
 <input type ="t ......

[ASP.net]学习asp.net的完整流程

本贴来自ZDNetChina中文社区 http://bbs.zdnet.com.cn/
本贴地址:http://bbs.zdnet.com.cn/viewthread.php?tid=108315
 
如果你已经有较多的面向对象开发经验,跳过以下这两步:
  第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号