DirectiveControlGetAllDirectives Method (ConnectionId, SessionId, Int32, CSFileObjectTypes) Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Returns the all ASP.NET directive types for the site root, a unit, category or document.

Namespace: ContentStudio.Document
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public string GetAllDirectives(
	ConnectionId connectionId,
	SessionId sessionId,
	int objectId,
	CSFileObjectTypes objectType
)

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).
objectId
Type: SystemInt32
The object to get directives for.
objectType
Type: ContentStudio.DocumentCSFileObjectTypes
The type of Content Studio object referenced by the objectId parameter

Return Value

Type: String
Xml, a simple one tag document with the attributes in use and their values. The content of the xml is dependent on what type of directive to get and what types of directives that does not have default values.

<directives>
   <Page Language="VB" Strict="true" />
   <OutputCache Duration="100" VaryByParam="di" Location="Server" />
</directives>

The element names returned are the directive name and the attributes defines the attributes of the directive. The following directives will be returned.

DirectiveDescriptionRead more
AssemblyLinks an assembly to the current page or user control declarativelyhttp://msdn.microsoft.com/en-us/library/d864zc1k.aspx
ControlDefines control-specific attributes used by the ASP.NET page parser and compiler and can be included only in .ascx files (user controls).http://msdn.microsoft.com/en-us/library/d19c0t4b.aspx
ImportImports a namespace into a page or user control explicitly.http://msdn.microsoft.com/en-us/library/eb44kack.aspx
MasterIdentifies a page as a master page and defines attributes used by the ASP.NET page parser and compiler and can be included only in .master fileshttp://msdn.microsoft.com/en-us/library/ms228176.aspx
OutputCacheControls the output caching policies of a page or user control declarativelyhttp://msdn.microsoft.com/en-us/library/hdxfb6cy.aspx
PageDefines page-specific attributes used by the ASP.NET page parser and compiler and can be included only in .aspx fileshttp://msdn.microsoft.com/en-us/library/ydy4x04a.aspx
ReferenceLinks a page, user control, or COM control to the current page or user control declarativelyhttp://msdn.microsoft.com/en-us/library/w70c655a.aspx
RegisterAssociates aliases with namespaces and classes, which allow user controls and custom server controls to be rendered when included in a requested page or user controlhttp://msdn.microsoft.com/en-us/library/c76dd5k1.aspx
Exceptions

ExceptionCondition
CSExceptionA business rule was violated in the underlying Content Studio database
  • 1001 - Session is invalid.
  • 1002 - Permission denied.
  • 1004 - The container is missing.
  • 1009 - Invalid parameter value
  • 1100 - The document is missing
CSInvalidSessionExceptionThe session is invalid (version 5.4 and later)
CSPermissionDeniedExceptionPermission denied (version 5.4 and later)
CSInvalidParameterExceptionInvalid parameter value (version 5.4 and later)
CSDocumentNotFoundExceptionThe document is missing (version 5.4 and later)
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

READ / READ CONTAINER permission on the document / container is required.
Remarks

This method is new in Content Studio 5.3.
Note Note
The behavior of this method changed in Content Studio 5.4. Not all containers and documents can have directives. For more information GetDirectivesApplicable
See Also

Reference

Other Resources