protected void TextBox1_TextChanged(object sender, EventArgs e)
{
string txtname = this.TextBox1.Text.Trim();
IList<Book> listbook = BookManager.getbookbytitle(txtname);
this.GridView1.DataSource = listbook;
this.GridView1.DataBind();
for (int i = 0; i < GridView1.Rows.Count; i++)
{
string titlename = (this.GridView1.Rows[i].FindControl("lbltype") as Label).Text.Trim();
if (titlename == "1")
{
(this.GridView1.Rows[i].Cells[3].FindControl("lbltype") as Label).Text = "文学";
}
if(titlename=="2")
{
(this.GridView1.Rows[i].Cells[3].FindControl("lbltype") as Label).Text = "其他";
}
}
}