Поделиться через


CategoryName Property

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

NOTE: This API is now obsolete.

(Obsolete) Use CategoryClause property instead. Gets or sets the category name used for the search.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
<ObsoleteAttribute("CategoryName is now obsolete, please use CategoryClause property instead and specify a value in the CategoryName=N'CategoryName' format.  ")> _
Public Property CategoryName As String
'Usage
Dim instance As CatalogSearch
Dim value As String

value = instance.CategoryName

instance.CategoryName = value
[ObsoleteAttribute("CategoryName is now obsolete, please use CategoryClause property instead and specify a value in the CategoryName=N'CategoryName' format.  ")]
public string CategoryName { get; set; }
[ObsoleteAttribute(L"CategoryName is now obsolete, please use CategoryClause property instead and specify a value in the CategoryName=N'CategoryName' format.  ")]
public:
property String^ CategoryName {
    String^ get ();
    void set (String^ value);
}
public function get CategoryName () : String
public function set CategoryName (value : String)

Property Value

Type: System..::.String
A System.String that contains the category name used for the search.

Exceptions

Exception Condition
ValidationException

The CategoryName is invalid.

Remarks

The CategoryName property contains the category name used for the search.

You can perform category searches by setting the CategoryName property to the category you want to perform the search on. If you specify the CategoryName then you should also add catalog name the category belongs to, to the CatalogNames property. The search will fail if you specify a CategoryName but set zero or more than one catalog to the CatalogNames property. If CategoryName is "" then the search will be performed on the root category in the CatalogNames. The CategoryName should:

  • Not exceed 215 characters.

  • Exist in the catalog.

  • Can be "" in which case the category will be treated as a root category.

Permissions

See Also

Reference

CatalogSearch Class

CatalogSearch Members

Microsoft.CommerceServer.Catalog Namespace