Recommended: asp+sql2000 stored procedure pagination example 1. Return the stored procedure of the total number of records sets: CREATE procedure dbo.recordCount ( @TableName nvarchar(100), --Database table name @strWhere nvarchar(500), --Query condition @count int output---Output value, total number of records sets) as declare @sqlStr nvarchar(1000) if @strWhere != '' set @sqlSt
- <%
- '----------------------------------------------------------------
- 'Program Introduction: Complete the addition, deletion, modification, and viewing of the specified node text in the XML document by the Asp language
- 'Entry parameters: None
- 'Export parameters: None
- '------------------------------------------------
- 'Function name: ConnectXml()
- 'Entermination parameters: filename requires connection or opening xml file name
- 'Export parameters: None
- 'Return value: ConnectXml=0, XMLMorntekDocument is an object that successfully loads XML documents.
- 'ConnectXml<>0, print error message strError
- '------------------------------------------------
- dimXMLMorntekDocument
- functionConnectXml(filename)
- dimstrSourceFile
- strSourceFile=Server.MapPath(filename)
- SetXMLMorntekDocument=Server.CreateObject(Microsoft.XMLDOM)
- XMLMorntekDocument.async=false
- XMLMorntekDocument.load(strSourceFile)
- ConnectXml=XMLMorntekDocument.parseerror.errorcode
- ifXMLMorntekDocument.parseerror.errorcode<>0then
- strError=<h2>error&XMLMorntekDocument.parseerror.errorcode&</h2>
- strErrorstrErrorStrErrorStrErrorError=strError&XMLMorntekDocument.parseerror.reason&<br>
- strErrorstrErrorStrErrorStrErrorError=strError&XMLMorntekDocument.parseerror.url&<br>
- strErrorstrErrorStrErrorStrErrorError=strError&XMLMorntekDocument.parseerror.line&<br>
- strErrorstrErrorstrErrorstrErrorError=strError&XMLMorntekDocument.parseerror.filepos&<br>
- strErrorstrErrorstrErrorstrErrorError=strError&XMLMorntekDocument.parseerror.srcText&<br>
- response.writestrError
- endif
- endfunction
- '------------------------------------------------
- 'Function name: CloseXml()
- 'Entry parameters: None
- 'Export parameters: None
- '------------------------------------------------
- functionCloseXml(XMLMorntekDocument)
- ifIsObject(XMLMorntekDocument)then
- setXMLMorntekDocument=nothing
- endif
- endfunction
- '------------------------------------------------
- 'Function name: SelectXmlNodeText(elementname)
- 'Entry parameter: the name of the elementname element
- 'Export parameters: None
- '------------------------------------------------
- functionSelectXmlNodeText(elementname)
- elementname=//&elementname
- temp=XMLMorntekDocument.selectSingleNode(elementname).text
- selectXmlNodeText=server.htmlencode(temp)
- endfunction
- '------------------------------------------------
- 'Function name: InsertXmlNodeText(befelementname, elementname, elementtext)
- 'Entry parameter: The name of the element inserted by elementname
- 'befelementname Insert element before the name of this element
- 'elementtext text of the element inserted
- 'Export parameters: None
- '------------------------------------------------
- functionInsertXmlNodeText(befelementname, elementname, elementtext)
- dimbefelement, element
- setbefelement=XMLMorntekDocument.selectSingleNode(//&befelementname)
- setelement=XMLMorntekDocument.createelement(elementname)
- mistake.insertBeforelement,befelement.firstchild
- element.text=elementtext
- endfunction
- '------------------------------------------------
- 'Function name: UpdateXmlNodeText(elementname,newelementtext)
- 'Entry parameter: the name of the elementname element
- 'newelementtext element's new text
- 'Export parameters: None
- '------------------------------------------------
- functionUpdateXmlNodeText(elementname,newelementtext)
- dimelement
- setelement=XMLMorntekDocument.selectSingleNode(//&elementname)
- element.text=newelementtext
- endfunction
- '------------------------------------------------
- 'Function name: DeleteXmlNodeText(elementname)
- 'Entry parameter: the name of the elementname element
- 'Export parameters: None
- '------------------------------------------------
- functionDeleteXmlNodeText(elementname)
- XMLMorntekDocument.selectSingleNode(//&elementname).text=
- endfunction
- %>
Share: ASP click to refresh the verification code instance code Most of the verification codes on the website are picture verification codes, just like the one below http://dwww.cn/Books.asp. Users may stay on the page for a long time, and the verification code may expire when the last submission is finally submitted. So you need to add a refresh function. Verification code: input name='checkimg' type='text' class='input' id='che