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

Asp三级联动下拉菜单数据库调用版

<%
Option Explicit
'数据库结构:
'location
'表1 loaction  所在的市 表
'   字段
'   loactionid  (主键)
'   loactionname 名字
'表2 district  所在的县 表
'   字段
'   locationid (主键)
'    districtid
'    districtname
'表3 village  所在的乡镇 表
'   字段
'   districtid (主键)
'   villageid
'   villagename
%>
<html>
<head>
<title>List</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
dim conn
dim rs
dim sql
dim count
dim rs1
dim sql1
dim rs2
dim sql2
dim count2
dim connstr
connstr="DBQ="+server.mappath("db11.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
   set conn=server.createobject("ADODB.CONNECTION")
   conn.open connstr
sql = "select * from district order by locationid asc"
set rs = conn.execute(sql)
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof
        %>
subcat[<%=count%>] = new Array("<%=trim(rs("districtname"))%>","<%= trim(rs("locationid"))%>","<%= trim(rs("districtid"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        set rs=nothing
        %>
onecount=<%=count%>;
function changelocation(locationid)
    {
    document.myform.smalllocation.length = 0;


相关文档:

ASP.NET读取ASP设置的Cookie

    这类问题通常在整合或二次开发ASP网站时遇到。按常理来说,浏览器的Cookie存放在客户端,实际上与服务端使用什么语言无关,但我们在实际操作过程中,总会遇到一些意想不到的问题。
    1. 当ASP写的Cookie的Key中带有下划线,例如我们在ASP中这样设置Cookie:
     ......

asp MD5加密函数

<%
Private Const BITS_TO_A_BYTE = 8
Private Const BYTES_TO_A_WORD = 4
Private Const BITS_TO_A_WORD = 32
Private m_lOnBits(30)
Private m_l2Power(30)
Private Function LShift(lValue, iShiftBits)
If iShiftBits = 0 Then
LShift = lValue
Exit Function
ElseIf iShiftBits = 31 Then
If lValue And ......

像ASP一样轻松实现分页显示数据C#

 
代码如下:
<%@ Page Language="C#" Debug="true" %>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.SqlClient"%>
<Script Language="C#" runat="server">
int Record_Per_Page;//定义每页显示记录数
int nPageCount;//定义总页数
int nRecCount;//定义总 ......

asp连sqlserver测试代码

<%
Dim Conn, Connstr
Dim strServer, strUid, strPwd, strDB
strServer = "HUA-5780C2D1CCF"        'SQL数据库服务器地址
strUid = "sa"                '数据库用户名
strPwd = "123456"  ......

asp操作XML

Dim xmlDoc
NewsConfigFile=server.MapPath("/test.xml")
Set xmlDoc=Server.CreateObject("msxml2.FreeThreadedDOMDocument.3.0")
If Not xmlDoc.load(NewsConfigFile) Then
 'XmlDoc.loadxml "<?xml version=""1.0"" encoding=""gb2312""?><NewscodeInfo/>"
 response.Write("不存在数据")
& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号