日期:2014-05-18  浏览次数:20438 次

用fckeditor分页符出错?
用的fckeditor上的分页符按钮,分页代码是
C# code
protected void PageNews(string news)
        {
            string[] a = new string[] { "<div style='page-break-after: always'><span style='display: none'>page break</span></div>" };
            string[] temp = news.Split(a, StringSplitOptions.RemoveEmptyEntries);
            //string[] temp = news.Split('^');
            int currentPage = 1;
            if (temp.Length <= 1)
            {
                this.lblContent.Text = news.ToString();
            }
            else
            {
                for (int i = 0; i < temp.Length; i++)
                {
                    if (i == currentPage)
                    {
                        this.lblPageNumber.Text = "第" + i + "页 | ";
                    }
                    else
                    {
                        lblPageNumber.Text += "[<a href=LookArticle.aspx?id=" + HttpContext.Current.Request["id"].ToString() +
                        "&page=" + i + ">" + (i + 1) + "</a>]&nbsp;&nbsp;";
                        currentPage = i;
                    }
                    lblContent.Text = temp[currentPage].ToString();
                }
                //pageNum.Text += pageInfo;
            }
        }

那个数组a就是fck里的分页符代码,但是现在使用这个后无效,还是显示的全部文章
做过fckeditor分页的能不能给点代码参考下!

------解决方案--------------------
帮顶,没用过
------解决方案--------------------
http://blog.csdn.net/mayongzhan/archive/2007/11/21/1896932.aspx