Adds the type of the content.
Namespace: DotNetNuke.Entities.ContentAssembly: DotNetNuke (in DotNetNuke.dll)
Syntax
| C# |
|---|
public int AddContentType( ContentType contentType ) |
| Visual Basic |
|---|
Public Function AddContentType ( contentType As ContentType ) As Integer |
Parameters
- contentType
- Type: DotNetNuke.Entities.Content..::..ContentType
Type of the content.
Return Value
content type id.Implements
IContentTypeController..::..AddContentType(ContentType)
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | content type is null. |
| System..::..ArgumentException | contentType.ContentType is empty. |