Dynamicweb 8 Documentation
GetCommaSeparatedProductIDs Method
Example 

The products.
Returns list of IDs.
Syntax
'Declaration
 
Public Shared Function GetCommaSeparatedProductIDs( _ 
   ByVal products As ProductCollection _ 
) As String
public static string GetCommaSeparatedProductIDs( 
   ProductCollection products 
)

Parameters

products
The products.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionIf given ProductCollection is null.
Example
class MyPage : System.Web.UI.Page
{
   public string Delete(ProductCollection products, bool run)
   {
       string SQL = "DELETE FROM EcomDetails WHERE DetailProductID " + Product.GetSqlConditionPartForIDs(Product.GetCommaSeparatedProductIDs(products)) + "; ";
       if (run)
       {
           Database.ExecuteNonQuery(SQL, "Ecom.mdb");
       }
       return SQL;
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Product Class
Product Members

Send Feedback