search.aspx.cs
上传用户:shjujing
上传日期:2022-07-28
资源大小:11244k
文件大小:1k
源码类别:

Email客户端

开发平台:

Visual C++

  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 search : System.Web.UI.Page
  12. {
  13.     BaseClass bc = new BaseClass();
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.         DataList1.DataSource = bc.GetDataSet(Convert.ToString(Session["search"]), "tb_news");
  17.         DataList1.DataKeyField = "id";
  18.         DataList1.DataBind();
  19.         Label1.Text = Convert.ToString(Session["tool"]);
  20.     }
  21.     protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
  22.     {
  23.         string id = DataList1.DataKeys[e.Item.ItemIndex].ToString();
  24.         Response.Write("<script language=javascript>window.open('showNews.aspx?id=" + id + "','','width=520,height=260')</script>");
  25.     }
  26. }