Input string was not in a correct format.
public void Search() { OleDbConnection conn = new OleDbConnection(); conn.ConnectionString = "Provider=Microsoft.Jet.OleDb.4.0; Data Source=" + Server.MapPath("~/App_Data\\Database1.mdb"); conn.Open(); string sorgu = "Select * from Table1 where AD Like '" + TextBox1.Text +"'"; OleDbDataAdapter adap = new OleDbDataAdapter(sorgu, conn); DataSet ds = new DataSet(); adap.Fill(ds, "Table1"); GridView1.DataSource = ds; GridView1.DataBind(); conn.Close(); }
select * from table1 where AD like '%"+ TextBox1.Text+"%'";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)