Posted on: 11/9/2014 11:54:37 AM | Views : 402

I am trying to make this code work fine as i can but i couldnt,i am using cookie "Location" and i want to rebind my ListView depending on cookie Location but i am getting error message: "The parameterized query '(@Location nvarchar(4000),@CATE nvarchar(4))SELECT DISTINCT AdsI' expects the parameter '@Location', which was not supplied."

protected void Sortcarbtn_Click(object sender, EventArgs e) { HttpCookie cookie = Request.Cookies.Get("Location"); using (SqlConnection carcon = new SqlConnection(ConfigurationManager.ConnectionStrings["BeravaConnectionString"].ConnectionString)) if (cookie != null) { string CarSqlST = @"SELECT DISTINCT AdsID, Section, Category, Country, Maker, Gear, Condition, Status, State, City, AdsTit, SUBSTRING(AdsDesc,1,155) as AdsDesc, Year, AdsPrice, Img1 From ads ...

Go to the complete details ...