復制代碼 代碼如下:
<%
response
Class JSONClass
Dim SqlString
Dim JSON
Dim DBConnection
Public Function GetJSON ()
dim Rs
dim returnStr
dim i
dim oneRecord
Set Rs= Server
Rs
if page<>
epage=cint(page)
if epage<
if epage>rs
else
epage=
end if
rs
rs
if Rs
returnStr=
for j=
if rs
oneRecord =
for i=
oneRecord=oneRecord & chr(
Next
oneRecord=left(oneRecord
oneRecord=oneRecord &
returnStr=returnStr & oneRecord
Rs
next
returnStr=left(returnStr
returnStr=returnStr &
end if
Rs
set Rs=Nothing
GetJSON=returnStr
End Function
Private Function check()
End Function
End Class
%>
復制代碼 代碼如下:
<!
<!
<%
dim page
page = request
rows = request
sidx = request
sord = request
if page=
if rows =
if sidx =
if sord =
Dim strSearchOn
strSearchOn = Request(
If (strSearchOn =
strField = Request(
If (strField =
strFieldData = Request(
strSearchOper = Request(
strWhere =
Select Case strSearchOper
Case
strFieldData = strFieldData &
strWhere = strWhere &
Case
If(IsNumeric(strFieldData)) Then
strWhere = strWhere &
Else
strWhere = strWhere &
End If
Case
If(IsNumeric(strFieldData)) Then
strWhere = strWhere &
Else
strWhere = strWhere &
End If
Case
If(IsNumeric(strFieldData)) Then
strWhere = strWhere &
Else
strWhere = strWhere &
End If
Case
If(IsNumeric(strFieldData)) Then
strWhere = strWhere &
Else
strWhere = strWhere &
End If
Case
If(IsNumeric(strFieldData)) Then
strWhere = strWhere &
Else
strWhere = strWhere &
End If
Case
If(IsNumeric(strFieldData)) Then
strWhere = strWhere &
Else
strWhere = strWhere &
End If
Case
strWhere = strWhere &
Case
strWhere = strWhere &
End Select
End if
End If
server
dim a
set a=new JSONClass
a
a
response
conn
set conn = nothing
%>
裡面把搜索的代碼涵蓋了
復制代碼 代碼如下:
<%Option Explicit%>
<!
<%
Dim strOper
strOper = Request(
strID = Replace(Request(
strTitle = Replace(Request(
strNickName = Replace(Request(
strPwd = Replace(Request(
Select Case strOper
Case
strSQL =
Case
strSQL =
Case
strSQL =
End Select
Dim strSQL
Call OpenDB()
Set rs = Conn
Call CloseDB()
%>
這是前台l代碼
復制代碼 代碼如下:
<!DOCTYPE html PUBLIC
<html xmlns=
<head>
<meta http
<title>ASP_jqGrid_Test</title>
<link rel=
<link rel=
<link rel=
<script type=
<script type=
<script type=
</head>
<body>
<table id=
<div id=
</body>
</html>
<script type=
jQuery(
url:
datatype:
colNames:[
colModel :[
{
name:
index:
width:
}
{
name:
index:
editable:true
editrules:{
required:true
}
}
{
name:
index:
editable:true
editrules:{
required:true
}
}
{
name:
index:
editable:true
edittype:
hidden:true
editoptions:{
size:
}
editrules:{
edithidden:true
}
}
{
name:
index:
align:
editrules:{
required:true
}
} ]
imgpath:
multiselect: true
rowNum:
rowList:[
pager: jQuery(
sortname:
viewrecords: true
sortorder:
height:
width:
editurl:
});
$(
refresh: true
edit: true
add: true
del: true
search: true
searchtext:
edittext:
});
</script>
jqGrid
From:http://tw.wingwit.com/Article/program/Web/201405/30793.html