PromoCode Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets or sets a Promo code entered by the end-user.

Namespace:  Microsoft.CommerceServer.Runtime.Orders
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Property PromoCode As String
'Usage
Dim instance As PromoCodeRecord
Dim value As String

value = instance.PromoCode

instance.PromoCode = value
public string PromoCode { get; set; }
public:
property String^ PromoCode {
    String^ get ();
    void set (String^ value);
}
public function get PromoCode () : String
public function set PromoCode (value : String)

Property Value

Type: System..::.String
A Promo code entered by the end-user.

Exceptions

Exception Condition
ArgumentNullException

The value being set is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentException

The length of the string being set is greater than the maximum specified in the Orders storage mapping file.

Remarks

Stores a Promo code entered by the end-user. The PromoCode is a string which the customer types into a site to redeem a PromoCode-enabled discount.

The value is trimmed before setting.

The default maximum length for PromoCode is 64 characters, as defined in the corresponding table column constraint specified in the default Orders storage mapping file, OrderObjectMappings.xml.

Permissions

See Also

Reference

PromoCodeRecord Class

PromoCodeRecord Members

Microsoft.CommerceServer.Runtime.Orders Namespace