Create values of a product attribute

To create a product attribute value, you must perform the following:

  1. Get the catalog manager.
    Get an instance of the CatalogManager object.
  2. Get the parent attribute.
    Get an instance of the specified parent attribute.
  3. Create new product attribute value.
    To create new product attribute value, call the CreateProductAttributeValue method of the manager.
  4. Set the properties of the ProductAttributeValue instance.
    In this example the following properties are set:
    • Title
    • Name
    • IsActive
    • Description
    • Ordinal
  5. Associate the attribute value to the attribute.
    To do this, set the Parent property to the instance of the parent attribute.
  6. Save the changes.
    Save the changes to the catalog manager.

Use the following code sample:

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?