Exemplo n.º 1
0
    protected void Button4_Click(object sender, EventArgs e)
    {
        string keywords = this.KeyBox.Text.Trim().Replace("%", "");

        if (keywords == "")
        {
            Utility.Alert(this, "关键字不能为空!");
            return;
        }

        DataTable lists = bll.GetItemListAllByKeywords(keywords);

        this.List.AllowPaging = false;
        this.List.PageIndex   = 0;
        this.List.DataSource  = lists;
        this.List.DataBind();
        this.Label1.Text = "记录:" + lists.Rows.Count;
    }