我写了这段代码,但这段代码不是真的。我想显示行表,其中 pname=textbox1.text
protected void btnSearch_Click(object sender, EventArgs e)
{
SqlDataSource2.SelectCommand = "select pid, pname, pprice,publisher, writer FROM tblproduct where pname LIKE '" + txtName.Text + "%';";
GridView1.EmptyDataText = "search not result";
}