---- If the user enters the product number, the user does not have to enter the full name. This method is used to search for the full number of items.
---- If the user enters the product number, the user does not have to enter the full name. This method is used to search for the full number of items.
III. Script
---- There are three Asp files in the whole process (excluding the Html statement)
---- There are three Asp files in the whole process (excluding the Html statement)
---- 1 user query data Input table ticket: Input. Asp
----- The user enters the product number
<Form Method = "Post" Action = "/Cgi/Prod. Asp">
<Input Type = "Text" Name = "Id" Size = "20">
<Input Type = "Submit"
Value = "Submit" Name = "B1">
</Form>
2. One paging handler: Prod. Asp
---- Triggered after the user submits the form Input. Asp
<% Cid = Trim (Request. Form ("Id") %>
<% Set Rlt = Createobject ("Adodb. Recordset") %>
* ***** Create a Recordset object
<% SQL = "Select * From Product Where Product_Id Like'
"& Cid &" '+' % '">
<% Rlt. Open SQL, "Uid = Ncgi; Pwd = SQL; Dsn = Tcgi", 1%>
* ***** Execute an SQL statement
<% If Rlt. Pagecount <1 Then %>
<H2> no Records </H2>
<A Href = "Javascript: History. Back ()">
Return </A>
<% Else %>
------------------- Polaris Library | http://www.ebook007.com
* ***** The following query information is displayed: Display style:
* ***** XXX record page numbers on XX pages: 1. 2. 3. 4. 5 .........
Total pages <% = Rlt. Pagecount %>
<% = Rlt. Recordcount %> records
Page Number: <% For I = 1 To Rlt. Pagecount %>
<% Cid = rlt ("product_id ")
<AHref = "Prodpage. Asp? Pcnt = <% = I %> & id = <% = cid %>
<% = I %>. </A>
<% Next %>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service