.cs
string x = Request.QueryString["Name"] + "%";
con.Open();
SqlCommand scom = new SqlCommand();
scom.Connection = con;
scom.CommandText = "select Keyword from products where keyword NOT LIKE @x ";
// scom.CommandText = "select * from proper where @x notlike keyword";
scom.Parameters.AddWithValue("@x", x);
DataSet ds = new DataSet();
SqlDataAdapter dap = new SqlDataAdapter();
dap.SelectCommand = scom;
dap.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
KrishnaPosted Mar 23, 2015, 6:45 AM
Manish Kumar ChoudharyPosted Mar 23, 2015, 5:51 AM
KrishnaPosted Mar 23, 2015, 5:47 AM
Manish Kumar ChoudharyPosted Mar 23, 2015, 3:48 AM
try this.
any keyword not start with x
string x = "%"+Request.QueryString["Name"];
KrishnaPosted Mar 23, 2015, 3:39 AM
Manish Kumar ChoudharyPosted Mar 23, 2015, 3:15 AM
scom.CommandText = select * from proper where keyword NOT Like @x