You could try it like this:
int selectedCounter = listBox1.SelectedItems.Count;
String sqlQuery = "select * from productvw where ";
for (int i = 0; i < selectedCounter; i++)
{
if(i != 0)
{
sqlQuery += " or ";
}
sqlQuery += "Firstname = @Fn" + i.toString();
}
using (SqlConnection connection = new SqlConnection(connectionString))
{
using (SqlCommand command = new SqlCommand(sqlQuery, Connection))
{
for (int i = 0; i < selectedCounter; i++)
{
command.Parameters.AddWithValue("@Fn"+i.toString();listBox1.SelectedItem[i].Text);
Connection.Open();
SqlDataReader reader = command.ExecuteReader();
while (Reader.Read())
{
}
}
}
}