Patement recorded in ASP

zhaozj2021-02-16  69

Today, I have encountered a netizen asking the problem of DataGrid paging. It is obvious that this netizen is also an ASP. In fact, many friends who have just gated often because they encounter such small problems, spend a long time to solve, especially when there is no friend, I can discuss it, I understand this kind of mood, given this situation, I intend to post a page in a classmate record I wrote, this page mainly involves the DataGrid paging problem. I hope that our small rookie family will make progress together, and strive to be no dish soon, huh, huh.

Ok, gossip less, the following is the code:

Contact < FONT SIZE = "2"> Add
<% sql = "select * from mats order by name" set = server.createObject ("AdoDb.Recordset") RS.Open SQL, CONN, 1, 1SESSION ("Name") = rs ("name") if NOT = 2Page = Request.QueryString ("CurrentPage" if Page = "" "" = CINT (PAGE)%>
Name gender < TD> Home Phone office phone Mobile phone residential address company name Company address position Operation <% do while not xif and size

<% = rs ("name")%>

<% = rs ("SEX")%> < TD> <% = rs ("home_tel")%> <% = rs ("Company_TEL")% > <% = rs ("Mobile")%> <% = rs ("Home_address")%> <% = = rs ("Company_NAME")%> < TD> <% = rs ("company_address")%> <% = rs ("zhiwei")% > Modify delete < / font> <% = size 1LOOP%>
> page <% if Page = 1 THEN%> Home Previous <% else%>

Mate.asp? CurrentPage = 1> Home

Previous <% end if%> <% if cint (page) = rs.pagecount dam %> Next Page Last " <% else%> Next Page < TD> > Last "

<% end IF%> <% end if%>

The code is not a pleasure, no matter what you have, or you have better implementation of the paging method, you are welcome to participate in the review.

In addition, I also wrote a few articles about DataGrid in Asp.Net, welcome everyone to browse and participate in comments. There are DataGrid inside the keyword.

转载请注明原文地址:https://www.9cbs.com/read-22609.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.038, SQL: 9