【asp源码栏目提醒】:网学会员,鉴于大家对asp源码十分关注,论文会员在此为大家搜集整理了“asp net留言板管理源代码 - 编程语言”一文,供大家参考学习!
using System using System.Data using System.Data.OleDb using System.Configuration using System.Collections using System.Web using System.Web.Security using System.Web.UI using System.Web.UI.WebControls using System.Web.UI.WebControls.WebParts using System.Web.UI.HtmlControls using System.Text public partial class Book_Get : System.Web.UI.Page string strConn System.Web.Configuration.WebConfigurationManager.ConnectionStringsconnStr.ConnectionString string s_CurrentPage string.Empty string s_PageCount string.Empty string s_RecordCount string.Empty int i_CurrentPage 0 int i_PageCount 0 int i_RecordCount 0 protected void Page_Loadobject sender EventArgs e if Request.ParamsPageIndex null if string.IsNullOrEmptyRequest.ParamsPageIndex s_CurrentPage Request.ParamsPageIndex.ToString i_CurrentPage Int32.Parses_CurrentPage BindDateList string GetNamestring strIN string strTemp strIN if strTemp.Length 10 strTemp strTemp.Substring0 10 return strTemp void BindDateList string strSql_Count Select Count from T_Book s_RecordCount SqlHelper.ExecuteScalarstrConn strSql_Count null.ToString i_RecordCount Convert.ToInt32s_RecordCount if i_RecordCount 10 0 i_PageCount i_RecordCount / 10 1 else i_PageCount i_RecordCount / 10 s_PageCount i_PageCount.ToString string strRecordTemp string.Empty strRecordTemp Convert.ToStringi_CurrentPage 10 string strSql string.Empty if s_CurrentPage 0 strSql select top 10 F_NameF_TitleF_AddTimeF_Book from T_Book order by F_Code DESC else strSql select top 10 F_NameF_TitleF_AddTimeF_Book from T_Book where F_Code not in select top strRecordTemp F_Code from T_Book order by F_Code DESC order by F_Code DESC OleDbDataReader Rdlist SqlHelper.ExecuteReaderstrConn strSql null DataTable Dt new DataTable DataRow dr Dt.Columns.AddF_Name typeofstring Dt.Columns.AddF_Title typeofstring Dt.Columns.AddF_AddTime typeofstring Dt.Columns.AddF_Book typeofstring while Rdlist.Read dr Dt.NewRow dr0 Rdlist0.ToString dr1 Rdlist1.ToString dr2 Rdlist2.ToString dr3 Rdlist3.ToString Dt.Rows.Adddr Rdlist.Close this.ImageList.DataSource new DataViewDt this.ImageList.DataBind protected override void RenderHtmlTextWriter writer if i_RecordCount 0 StringBuilder sp new StringBuilder sp.AppendLine sp.AppendLine sp.AppendLinenbspnbspnbspnbsp共nbsp sp.Appends_RecordCount sp.AppendLinenbsp条记录 sp.AppendLine sp.AppendLine if i_PageCount 1 if i_CurrentPage 0 sp.AppendLine下一页 sp.AppendLinenbsp sp.AppendLine末页 sp.AppendLinenbspnbsp else if Convert.ToInt32i_CurrentPage 1 i_PageCount sp.AppendLine首页 sp.AppendLinenbsp sp.AppendLine上一页 sp.AppendLinenbsp else sp.AppendLine首页 sp.AppendLinenbsp sp.AppendLine上一页 sp.AppendLinenbsp sp.AppendLine下一页 sp.AppendLinenbsp sp.AppendLine末页 sp.AppendLinenbspnbsp sp.AppendLine sp.AppendLine sp.AppendLine共 s_PageCount 页当前第 Convert.ToStringi_CurrentPage 1 页 sp.AppendLine sp.AppendLine sp.AppendLine writer.Writesp.ToString this.ImageList.RenderControlwriter