Jaa


Example Step 6: Modify the Web.Config File

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

This topic describes how to update the Web.config file to reference an extended Orders class.

To update the Web.config file

  1. Create a copy of the Web.config file if you want to be able to revert to your original configuration. Edit the Web.config file to perform the rest of this procedure.

  2. Update the definition and details of the class that you extended. For this example, modify the Type element for the OrderForm class. Provide the following attributes:

    Name

    Value

    Key

    "OrderForm"

    UserTypeName

    "MyOrderForm"

    AssemblyType

    "Local"

    NameSpace

    "VirtualGiftCertificates"

    Assembly

    "VirtualGiftCertificates"

    The Type element for the old OrderForm class will look as follows:

    <Type Key="OrderForm"
        UserTypeName="MyOrderForm"
        AssemblyType="Local"
        NameSpace="VirtualGiftCertificates"
        Assembly="VirtualGiftCertificates" />
    
  3. Define the VirtualGiftCertificate class. Add a Type element, and provide the following attributes:

    Name

    Value

    Key

    "VirtualGiftCertificate"

    UserTypeName

    "VirtualGiftCertificate"

    AssemblyType

    "Local"

    NameSpace

    "VirtualGiftCertificates"

    Assembly

    "VirtualGiftCertificates"

    The Type element for the old OrderForm class will look as follows:

    <Type Key="VirtualGiftCertificate"
        UserTypeName="VirtualGiftCertificate"
        AssemblyType="Local"
        NameSpace="VirtualGiftCertificates"
        Assembly="VirtualGiftCertificates" />
    
  4. Save the Web.config file.

See Also

Other Resources

Types Element

Orders Example: Adding Virtual Gift Certificates