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; }