protected void Button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=xenorix8-PC;Initial Catalog=sachi;Persist Security Info=True;User ID=sa;Password=123"); SqlCommand cmd = new SqlCommand("select * from tablename where convert(varchar(25),columnname,126) like '%" + TextBox1.Text + "%'", con); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); GridView1.DataSource = dt; GridView1.DataBind(); }
sa
AutoGenerateColumns="true"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)