DirectiveControlGetDirective Method (ConnectionId, SessionId, String, Int32, String) Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Returns the directive attribute in use with a certain ASP.NET directive.

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

public string GetDirective(
	ConnectionId connectionId,
	SessionId sessionId,
	string xmlParameterData,
	out int status,
	out string statusText
)

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).
xmlParameterData
Type: SystemString
XML that contains the parameters that this call uses. This XML is according to the Content Studio parameters XML schema
status
Type: SystemInt32
An integer indicating result of the call. Zero is success.
statusText
Type: SystemString
The textual representation of the call result.

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.

<root>
  <status></status>
  <statustext>0</statustext>
  <isinherited>Success</isinherited>
  <inheritedfrom>Boolean value</inheritedfrom>
  <forundatobjectid>Integer value</forundatobjectid>
  <forundatobjecttype>Integer value</forundatobjecttype>
  <directives>
     <Page Language="VB" Strict="true" />
  </directives>
</root>
or
<root>
  <status>0</status>
  <statustext>Success</statustext>
  <isinherited>Boolean value</isinherited>
  <inheritedfrom>String value</inheritedfrom>
  <foundatobjectid>Integer value</forundatobjectid>
  <foundatobjecttype>Integer value</forundatobjecttype>
  <directives>
     <OutputCache Duration="100" VaryByParam="di" Location="Server" />
  </directives>
</root>

The element names returned are the directive name and the attributes defines the attributes of the directive. The following directives can 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
Content Studio permissions

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

This is the backwards compatible implementation of this method. This implementation does not throw any exceptions, instead callers must examine the outcome of the call in the Status and StatusText output parameters.
See Also

Reference

Other Resources