Building a string for post request in the following way,
var itemsToAdd = sl.SelProds.ToList(); if (sl.SelProds.Count() != 0) { foreach (var item
build it with string.Join instead:
string.Join
var parameters = sl.SelProds.Select(x=>"productID="+x.prodID).ToArray(); paramstr = string.Join("&", parameters);
string.Join takes a seperator ("&") and and array of strings (parameters), and inserts the seperator between each element of the array.
"&"
parameters