Home > front end >  C # asp.net listview
C # asp.net listview

Time:09-20

Want to ask
I already have a gridview connected to the database, and want to add a search function in the same interface, but how to pass into the search box input information in the original the gridview displays the search result?

The above is the search box
Below is the background of the code
Protected void search_Click (object sender, EventArgs e)
{
SqlDataReader Dr;
SuperConn CNN=new superConn (" 2010 ");
CNN. The open ();
ListView1. Items. The Clear ();
String sql1;
Sql1="select * from dbo. PZD where the tag like '%" + chaxun. Text + "%'";
Dr=CNN. GetDataReader (sql1);
ListView1. The DataSource (Dr);
CNN. The close ();
}

Because is a small white for bosses give ah ~
  •  Tags:  
  • ASP
  • Related