Posted on: 5/14/2015 3:20:22 PM | Views : 827

Hello all
I have post the same post before, and thanks for all people whose already replied to me but their solution didnt work at all they advice me to use parameter to avoid sql injection and many of kind people tried to give a solutions and i become confuse and in same time no any solution work at all. SO please i know my code it can be hacking via sql injection but first of all i want to fix this case and maybe later after few days i will tried to re-fix to avoid sql injection.
the error message is: " Incorrect syntax near the keyword 'and'. " and it appear next to line: " ad.Fill(cdt); " 

protected void FilterBtn_Click(object sender, EventArgs e) { HttpCookie cookie = Request.Cookies.Get("Location"); using (SqlConnection carcon = new SqlConnection(ConfigurationManager.ConnectionStrings["BeravaConnectionString"].ConnectionString)) ...

Go to the complete details ...