I am using switch..case to display different things on my page depending on the product id:
switch (productID)
{
case 1:
string theSQL = "SELECT * FROM products WHERE id = " + theCurrentCase + "ORDER BY id DESC";
DataTable theDT = dbConnectionAndQuery.dbResults(theSQL, ConfigurationManager.ConnectionStrings["mainConn"].ConnectionString);
break;
}
Is there any way to accessing the case value (i.e. 1 in the example above)?