Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Utility Namespace / FileHelper Class / GetSafeBaseImageName Method
The string to use as the proposed file name (such as product sku)
If true file extension is included
Version
GetSafeBaseImageName Method
Gets a string that is suitable for use as a base image name
Syntax
public static string GetSafeBaseImageName( 
   string rawFilename,
   bool includeExtension
)

Parameters

rawFilename
The string to use as the proposed file name (such as product sku)
includeExtension
If true file extension is included

Return Value

A string that is safe to use in forming a file name, or string.Empty if a file safe name is not possible.
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