Ultra-long smart paging-HTML is supported.

Source: Internet
Author: User
When I was playing a game website in year 99, I was troubled by the publishing of articles. However, ASP was not excellent at that time. It will only be used. When a long file contains 10000 characters, the web page is a long one.
Last year, when I made a general article and the news management system, I wrote a piece of code to separate it. Paste it now.
My article input interface is a WEB-based HEMLEDITOR, which is similar to the ABC code here. Therefore, the actual submitted text is in HTML format.
The corresponding processing of HTML will not be made into HTML code.
Another brother once said that the principle is the same, but I have not read it carefully. I don't know what the difference is.
The code is as follows:
'Request Form Item
I _Forder = Request. Form ("I _Folder ")
I _Topic = Request. Form ("I _Topic ")
I _Title = htmlencode (Request. Form ("I _Title "))
I _Body = Request. Form ("body ")
I _Source = Request. Form ("I _Source ")
I _Keyword = htmlencode (Request. Form ("I _Keyword "))
I _ISHOT = request. form ("ishot ")
If I _ishot = "" then I _ishot = "N"
I _ispic = request. form ("ispic ")
If I _ispic = "" then I _ispic = "N"
I _pic = request. form ("InsertImage ")
I _body = replace (I _body, "contentEditable = true", "contentEditable = false ")
'Check Input
'Get Pages, B = Body
B _Len = Len (I _Body)
B _Pages = 1
T = Temp
T_Loop = true
Do While T_Loop here loop multiple times, every 4000 points one page, calculate the page number and add it to the database.
If B _Len> 4000 then
N_Body = Left (I _Body, 4000) 'n' = New
'If "<P" in N_Body, Else ">" in N_Body
If limit Rev (N_Body, "<P")> 0 and (Len (N_Body)-Limit Rev (N_Body, "<P") <400 then
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

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.