Hi,
As ProgramFOX suggested,
nameList = new List<string();
foreach (Product pr in prodList)
{
nameList.Add(pr.ProductName);
}
is correct.
Then have to focus on the following section,
foreach (string item in nameList)
{
if (!string.IsNullOrEmpty(txtCAuto.Text))
{
if (item.StartsWith(typedString))
{
autoList.Add(item);
}
}
}
If SQL query is correct and returns data then check whether elements in nameList. If so check whether you reach autoList.Add(item) or not.
Regards.