Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
This constructor is new in Content Studio version 5.2
[This is preliminary documentation and is subject to change.]
Creates a new instance of the CSSyncronizedDocument object that represents an empty document to be created.
Use this constructor when you intend to create a new document.
Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public CSSyncronizedDocument( ConnectionId connectionId, SessionId sessionId, CategoryId categoryId, string documentName, string fileName )
Parameters
- connectionId
- Type: ContentStudioConnectionId
A value that identifies the web site - sessionId
- Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId). - categoryId
- Type: ContentStudio.DocumentCategoryId
Defines the category where the new document should be saved. This category must exist and cannot be a category for uploaded files. - documentName
- Type: SystemString
The name to give the new document. This parameter cannot be null (Nothing in Visual Basic) or empty. - fileName
- Type: SystemString
The name of a file to use. This parameter must be null unless the UserDefinedFileName convention is used.
Exceptions
Exception | Condition |
---|---|
CSException |
|
InvalidOperationException | Uploaded files cannot be created with CSSyncronizedDocument |
ArgumentNullException | The documentName parameter is null (Nothing in Visual Basic). |
ArgumentOutOfRangeException | The documentName parameter is empty. |
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
- READ permission on the category is required to load the data.
- WRITE permission is needed to be able to actually create the document with the Save method.
Remarks
Note |
---|
In CS 5.2 you must specify the file name if the DocumentFileNamingConvention property is set to UserDefinedFileName before saving the document for the first time. In this case the fileName can be must be specified. The FileName can contain a file extension as long as this file extension matches one of the extension defined in the AllowedFiletypes property. |
See Also