권장 : 웹 사이트 제작 ASP 언어의 기능 및 기능 ASP (활성 서버 페이지의 약어)는 활성 서버 웹 페이지를 의미합니다. ASP는 CGI 스크립팅 프로그램을 대체하기 위해 Microsoft가 개발 한 응용 프로그램입니다. 데이터베이스 및 기타 프로그램과 상호 작용할 수 있으며 간단하고 편리한 프로그래밍 도구입니다. ASP 웹 페이지 파일의 형식은 .asp이며 이제 다양한 동적 웹 사이트에서 일반적으로 사용됩니다. ASP는 사용할 수있는 서버 측 스크립팅 환경입니다.
ASP Pagination 기능을 공유하면 꽤 좋아 보입니다. 보기는 그림에 나와 있습니다.
자신의 상황에 따라 코드를 수정할 수 있습니다.
<%
'Xie Liang은 페이징 프로그램을 수리합니다
'Call PageControl (총 레코드 수, 총 페이지 번호, 현재 페이지)
Sub PageControl (iCount, PageCount, Page)
response.write (<스타일 유형 = text/css>/*xie liang pagination css*/div.pager {padding : 10px;} div.pager a, div.pager span {padding : 2px 5px; margin : 2px; font-family : 安体; 경계 : 1px #363 solid;} div.pager a a ^ note-decoration a. {색상 :#000; 배경색 :#363} div.pager span.current {font-weight : bold; color : #fff; 배경색 :#363} div.pager span.current {font-weight : bold; color : #fff; back & chr (13)
딤 쿼리, a, x, temp
action = http : // & request.servervariables (http_host) & request.servervaribles (script_name)
query = split (request.servervariables (query_string), &)
쿼리의 각 X에 대해
a = split (x, =)
strcomp (a (0), page, vbtextcompare) <> 0 인 경우
temp = temp & a (0) & = & a (1) & &
끝 If
다음
response.write (<div class = pager>) & chr (13)
response.write (<span class = disabled> & page & / pagecount & page < / span>) & chr (13)
response.write (<span class = disabled> total & iCount & Record </span>) & chr (13)
pagecount <= 6 인 경우
xl = 1에서 pagecount
Page = xl이면
response.write (<span class = 'current'> & xl & </span>) & chr (13)
또 다른
response.write (<a href = '& action &? & temp & page = & xl &'> & xl & </a>) & chr (13)
끝 If
다음
또 다른
Page = 1 인 경우
response.write (<span class = 'current'> 1 </span>) & chr (13)
또 다른
response.write (<a href = '& action &? & temp & page = 1'> 1 </a>) & chr (13)
끝 If
Page> 4 인 경우 response.write (<span class = disabled> ... </span>) & chr (13)
Page <5 인 경우 i1 = 1 else i1 = page-2
Page> (pagecount-4) 인 경우 i2 = pagecount else i2 = page+3입니다
xll = i1 ~ i2의 경우
xll <> 1과 xll <> pagecount라면
xll = 페이지 인 경우
response.write (<span class = 'current'> & xll & </span>) & chr (13)
또 다른
response.write (<a href = & action &? & temp & page = & xll &> & xll & </a>) & chr (13)
끝 If
끝 If
다음
page <(pagecount-4) 인 경우 response.write (<span class = disabled> ... </span>) & chr (13)
page = pagecount then response.write (<span class = 'current'> & pagecount & </span>) & chr (13) else response.write (<a href = & action &? & temp &?
끝 If
response.write (</div>) & chr (13)
종료 서브
%>
공유 : 기본 형식의 중앙에 표시되도록 C# 하위 형태를 설정하십시오. 문제의 시작은 C# 전송에 의해 제기되었으며 메인 그룹의 모닝을 읽었습니다. 아래 솔루션에 대해 이야기하겠습니다. 실제로, 그것은 표면에서 매우 간단한 시작 인 것 같습니다. Form1 기본 형식, Form2 하위 형식의 두 가지 형태가 있으며, 대부분의 사람들이 하위 형태의 하중 이벤트에서 이것을 쓸 것이라고 생각합니다. 이것이 this.startPosition = formstartPosition.CenterParent;