长文章中插入分页符^进行分页
2010-03-06 16:45
211 查看
我知道怎么做了,供大家参考:
在长文章中插入分页符^进行分页
content为显示文章内容的label控件
lbpage为显示分页页码的label控件
C# code
在长文章中插入分页符^进行分页
content为显示文章内容的label控件
lbpage为显示分页页码的label控件
C# code
public NewsInfo one = new NewsInfo(); protected void Page_Load( object sender, EventArgs e) { if ( ! IsPostBack) { one = NewsManage.GetNewsModelByNewsId( " 38 " ); // 举个例子 int page = Convert.ToInt32(Request.QueryString[ " page " ]); string neirong = one.NeiRong.ToString(); GetNews(neirong, page); } } protected void GetNews( string strNews, int page) { string [] temp = strNews.Split( ' ^ ' ); // 取的分页符 if (temp.Length <= 1 ) { content.Text = strNews; // 文章内容 } else { lbpage.Text = " 共 " + temp.Length + " 页 " ; for ( int i = 0 ; i < temp.Length; i ++ ) { lbpage.Text += ( " [<a href =webform1.aspx?page= " + i + " > " + (i + 1 ) + " </a>] " ); } content.Text = temp[page].ToString(); } }
相关文章推荐
- asp.net长文章插入分页符^进行分页
- asp.net长文章插入指定分页符进行分页
- asp.net长文章插入分页符^进行分页
- 利用AspNetPager进行文章内分页(用ckeditor分页符进行分页)
- 文章,记录按内容分页显示,根据文章内容按字数进行分页
- 长文章用分页符来分页显示(ASP实现)
- word使用宏 在文章中插入源代码进行排版
- 用ckeditor分页符结合正则表达式给文章分页
- 对长了的文章进行分页显示!
- 【转载】用ckeditor分页符结合正则表达式给文章分页
- 对html或jsp文章列表页面进行js分页,结合使用apache的url Rewrite和jquery
- 使用js对文章内容进行分页
- 求asp.net长文章分页 代码(手动输入分页符)
- dede文章插入分页符不起作用,编辑器中出现分页符,导致文章显示不全
- 文章,记录按内容分页显示,根据文章内容按字数进行分页(转)
- PHP 长文章分页 手动插入分页标签
- 文章,记录按内容分页显示,根据文章内容按字数进行分页
- 比较长的文章进行分页显示
- PHP 长文章分页 手动插入分页标签
- asp.net对于长篇文章进行分页