AllInfo.aspx.cs
上传用户:tjxpgg
上传日期:2017-05-14
资源大小:2244k
文件大小:1k
源码类别:

SilverLight

开发平台:

ASP/ASPX

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. public partial class AllInfo : System.Web.UI.Page
  12. {
  13.     
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.         if (!IsPostBack)
  17.         {
  18.             ViewState["id"] =Convert.ToInt32( Request.QueryString["id"]);
  19.             Bind();
  20.         }
  21.     }
  22.     public void Bind()
  23.     { 
  24.         this.DetailsView1.DataSource = DBHelp.Select("select top 10 * from View_Book_Pub_Cat  where id=" + Convert.ToInt32(ViewState["id"]) + "");
  25.         this.DetailsView1.DataBind();
  26.     }
  27. }