WebpageControlOptions XML Elements Reference
You can display content defined for a Web page or within a CDATA tag on a work item form by using the WebpageControlOptions element. You can include either the Link or the Content child elements to specify either a URL or HTML for the content to appear in the form.
The WebpageControlOptions element is a child element of the CONTROL element.
Schema Hierarchy
<xs:element name="WebpageControlOptions" type="WebpageControlOptionsType" minOccurs="0" maxOccurs="1" />
<xs:element name="Link" type="HyperLinkType" minOccurs="0" maxOccurs="1" />
<xs:element name="Param" type="HyperLinkParamType" minOccurs="0" maxOccurs="unbounded"/>
<WebpageControlOptions AllowScript="true | false" ReloadOnParamChange="true | false" >
<Link UrlRoot="UrlRoot" UrlPath ="UrlPathWithParameters">
<Param index="IndexValue " value="Param Value " type ="Original | Current"/>
</Link>
<Content>
<![CDATA[Contents of HTML]]>
</Content>
</WebpageControlOptions>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Child Elements and Attributes
Element |
Attribute |
Description |
---|---|---|
WebpageControlOptions |
|
Optional Control element when type="WebpageControl". Container element for defining a URL whose contents will be rendered in the work item form. Optional LINK element. Required when UrlPath is specified. Specifies a value to be used to determine the URL of the hyperlink when UrlPath is specified. The element type is complex type: WebpageControlOptionsType. |
|
AllowScript |
Optional WebpageControlOptions attribute. Specifies whether JavaScript within the Web page is allowed to run (true) or not (false). The attribute type is xs:boolean. All other settings such as ActiveX are based on the Internet Explorer settings defined for the client. |
|
ReloadOnParamChange |
Optional WebpageControlOptions attribute. Specifies whether to reload (true) the contents of the Web page when a parameter in the work item form is changed (true) or not (false). The attribute type is xs:boolean. The default value is true. |
Link |
|
Optional WebpageControlOptions element. This element is mutually exclusive with the Content element. Specifies the URL for the Web page to be rendered in the work item form. For more information, see Link and Param XML Elements Reference. |
Content |
|
Optional WebpageControlOptions element. This element is mutually exclusive with the Link element. Specifies the HTML content that is to be rendered by the Web page control. The content is specified within a CDATA tag. For example: <![CDATA[Click here for detailed <b><a href="http://www.microsoft.com">Process Guidance</a></b>]]> The element type is xs:string.
Note
The HTML content is not validated prior to rendering it in the work item form.
|
Parent Elements
Element |
Description |
---|---|
Required parent element. Defines a field, text, hyperlink, or other control element to appear on the work item form. |
|
Optional LabelText element. Container element for the information or label to appear on the work item form. For more information, see LabelText and Text XML Elements Reference. |
Remarks
The Link and Content elements are mutually exclusive.
The AllowScript and ReloadOnParamChange attributes are not allowed when you use the Content element.
When the Web page control is configured to display raw HTML, all scripting is disabled. Any hyperlinks in the content that are clicked are opened in the Visual Studio Web browser if the work item form is shown in Visual Studio or in Internet Explorer.
Several toolbar buttons are added to the work item form for a tab that contains WebpageControl. These options include the following functions:
Back and forward navigation
Stop content loading and refresh content
Return to content home page
Open the content in a new window or in an external browser
In addition, if the Web page to be loaded contains untrusted content, then the icon is blocked and the blocked icon appears.
The WebpageControlOptions element is only recognized by clients that are running the latest version of Team Explorer. For previous versions, a red area is displayed and a message appears indicating that the control could not be found. For more information, see Providing Help Text, Process Guidance, Web Content, and Links to Web Pages on a Work Item Form.
Example
The following example shows how to load a work item form with HTML defined in a CDATA tag.
<Control Type="WebpageControl">
<WebpageControlOptions>
<Content>
<![CDATA[Click here for detailed <b><a href="https://www.microsoft.com">Process Guidance</a></b>]]>
</Content>
</WebpageControlOptions>
</Control>
Schema Definitions
WebpageControlOptionsType
<xs:complexType name="WebpageControlOptionsType">
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="Link" type="HyperLinkType"/>
<xs:element name="Content" type="xs:string"/>
</xs:choice>
<xs:attribute name="AllowScript" type="xs:boolean" use="optional" />
<xs:attribute name="ReloadOnParamChange" type="xs:boolean" use="optional" />
</xs:complexType>
NonBlankString
<xs:simpleType name="NonBlankString">
<xs:restriction base="xs:string">
<xs:pattern value=".*\S+.*"/>
</xs:restriction>
</xs:simpleType>
Element Information
Namespace |
https://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef |
Schema Name |
Work Item Type Definition |
Validation File |
WorkItemTypeDefinition.xsd |
Element Type |
WebpageControlOptionsType |
Can Be Empty |
Not applicable |
See Also
Concepts
Specifying Work Item Form Controls
Designing and Customizing a Work Item Form
Other Resources
Providing Help Text, Process Guidance, Web Content, and Links to Web Pages on a Work Item Form
Change History
Date |
History |
Reason |
---|---|---|
May 2011 |
Corrected the case of several elements and attributes of the XML syntax. The schema definition for tracking work items defines all child elements of the FORM element as camel-case and capitalizes all letters in the names of all other elements. |
Content bug fix. |
January 2011 |
Removed links to topics that have been removed. |
Information enhancement. |