private void WriteFY()//显示分页
{
if (this.SumOfPage > 0)
{
string up = Convert.ToString(this.CurrentPageIdx - 1);
string next = Convert.ToString(this.CurrentPageIdx + 1);
string end = Convert.ToString(this.SumOfPage);
string text = "<a href=\"Note.aspx?CuIdx=1\">首页</a>"
+ "\t<a href=\"Note.aspx?CuIdx=" + up + "\">上一页</a>\t"
+ this.GetPageIdx()
+ "\t<a href=\"Note.aspx?CuIdx=" + next + "\">下一页</a>"
+ "\t<a href=\"Note.aspx?CuIdx=" + end + "\">末页</a>";
this.FYdiv.InnerText = text;
}
}
private string GetPageIdx()
{
string text = "";
for (int i = 1; i <= this.SumOfPage; i++)
{
text += "<a href=\"Note.aspx?CuIdx=" + i + "\">" + i + "</a>";
}
return text;
}
private void Test()//打印调试数据
{
this.FYdiv.InnerText = "总信息数=" + this.SumInfo.ToString()
+ "<br />总页数=" + this.SumOfPage.ToString()
+ "<br />当前页=" + this.CurrentPageIdx.ToString()
+ "<br />开始信息序号=" + this.StartIdx.ToString()
+"<br />结束信息序号=" + this.EndIdx.ToString();
}
#endregion
------解决方案--------------------------------------------------------
mark
------解决方案--------------------------------------------------------
InnerText只能显示文本
不能显示HTML标记
分页方法学习了
------解决方案--------------------------------------------------------
楼主发帖最好说说出错信息是什么
------解决方案--------------------------------------------------------
jf
------解决方案--------------------------------------------------------
------解决方案--------------------------------------------------------
good luck