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

ASP直接生成html的代码


     此方法可以不需要专门制作模板文件,只需正常运行的动态页面即可,具体方法如下,最终使用见最后一个函数:
Function getHTTPPage(url) ‘首页生成开始
dim Http
set Http=server.createobject("MSXML2.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
if err.number<>0 then err.Clear
end function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
Function CreateStatic(txtURL,FileName)
sText = getHTTPPage(txtURL)
Set FileObject=Server.CreateObject("Scripting.FileSystemObject")
Set openFile=FileObject.OpenTextfile(server.mapPath(Filename),2,true) ‘true为不存在自行建立
openFile.writeline(sText)
Set OpenFile=nothing
End Function

Function CreateIndex()
Response.Write("首页生成中,请稍后...")
Response.Flush()
TxtUrl = "http://"&Request.ServerVariables("SERVER_NAME")&"/Default.asp"
FilePath = "/Default.html"
Call CreateStatic(TxtUrl,FilePath)
Response.Write(" ")
End Function


相关文档:

asp vb com组件开发与调试

今天在公司服务器上看一个老掉牙的asp程序,发现竟然调用了自定义com组件,是vb写的,封装了数据库连接与操作,文档上写这样做是为什么用户到服务器也看不到数据库的用户名与密码,也对啊,这个是财务的服务器,当然不能让我们it随便看了,呵呵!(it忽悠finance,让finance相信it看不到数据库用户名与密码,my god)由于, ......

asp常用的正则表达式实现字符串的替换


asp常用的正则表达式实现字符串的替换,主要包括去除html标签,去除class标签和去除script标签等
去除html标签正则<\/*[^<>]*>
Function LoseHtml(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "<\/*[^<>]*>"
......

ASP中使用SQLServer的事务控制及批执行Sql语句

<%
   SQL1 = "update table1 set a=b where id=1"
   Conn.ExeCute SQL1
    SQL2 = "update table2 set a=b where id=2"
   Conn.ExeCute SQL2
   SQL3 = "update table3 set a=b where id=3"
   Conn.ExeCute SQL3
%>
  &nb ......

C#实现象ASP中的数据添加

我想用C#实现象ASP中的
rs.addnew
rs( "a ")   =   "aaa "
rs( "b ")   =   123
rs.update
这样方法添加数据,问一下,要怎么做啊?
具体方法如下
              string   dbPath   =   "../App_data/We ......

asp操作数据库的ui

 <!--#include file="conn.asp"-->
<!--#include file="inc/head.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn" xmlns:q ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号