長文章分頁程式(根據設定標記)

2021-04-14 01:41:56 字數 982 閱讀 8552

//實現**

int page = 1;

if (request.querystring["page"] != null)

int articleid = convert.toint16(request["id"]);

dr = myclassda.index_article_show(articleid);  //sqldatareader index_article_show(int id) 建立物件

dr.read();

show1.innerhtml = dr["title"].tostring();

string content = dr["content"].tostring();

arraylist body = new arraylist();

string pagestr = "a_read.aspx?id=" + articleid + "&";

if (content.indexof("") > -1)//存在分頁符號則分頁

" }, stringsplitoptions.removeemptyentries);//string.split 2.0新增特性

//string templist = splitpage(content,"");//內容分頁

string templist = regex.split(content, "", regexoptions.ignorecase);

for (int i = 0; i < templist.length; i++)

}else

if (page < 1 || page > body.count)

if (body.count == 1)

else

else

}mycutepage.innerhtml = commonclass.pageinfo(body.count, "新聞", 1, page, pagestr, "篇");

dr.close();

長文章分頁顯示函式

public string nohtml string htmlstring 去除html標記 else if request.querystring pages null catch set the page content 設定獲取當前頁的大小 if m intcurrentpage m int...

實現長文章HTML分頁原始碼

本文在原文基礎上經過驗證除錯,修改部分內容。framecontent 北京奧運會頒獎禮儀服裝共十六款。其中 一款作為公升旗手 十五款分為五個系列,每一系列分別按照嘉賓引導員 運動員引導員和托盤員的不同職能設計了三個不同款式。在奧運會的302場和帕運會的472場頒獎儀式上,這五個系列的禮服將分別出現在...

用ASP實現長文章用分頁符來分頁顯示

長文章頁用分頁符來顯示,想用asp也實現這種功能,可發現只有根據字數進行分頁的方法,但這種方法有乙個bug,就是如果你文章內容中如果有ubb 它很容易造成在 code code 之間進行分頁,或者乾脆就把 code 分解成了 co和de 這樣文章顯示就會出現錯誤。以下幾個步驟將能夠完全實現。第一步 ...