In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you "ASP.Net how to achieve paging navigation", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to achieve paging navigation in ASP.Net" this article.
Asp.Net paging can set the link text displayed in the foreground of the first page, the previous page, the next page, and the last page of the page. Here only mention the simple function, in-depth study and analysis of its principle is more handy.
/ / the target container for containerId navigation. It is recommended to use the span tag / / url default to XXX.XX?pagenum= / / curPage current page number / / maxSection maximum number of segments (maximum number of pages in a paragraph) / / totalPage total number of pages function Navigate (containerId,url,curPage,maxSection, totalPage) {/ / to the first page symbol var first = "| |; / / previous page symbol var back =" / / illegal page number processing if (curPage > totalPage | | curPage
< 0) { curPage = 1; } //获得导航容器父元素 var containerObj = document.getElementById(containerId); //获得当前页所在的分段号(调试了老半天原来是类型问题,居然是float型) var curSection = Math.floor((curPage - 1) / maxSection + 1); //获得最后一个分段的号 var lastSection = Math.floor((totalPage - 1) / maxSection + 1); var html = ""; //当前页不是第1页,添加到首页,和前一页 if (curPage >1) {html + = "...";} / the first page number of the current segment var curSectionFirst = (curSection-1) * maxSection + 1; / / the last page number of the current segment var curSecitonLast = curSection * maxSection; / / outputs the page number of the current segment for (var I = curSectionFirst; I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.