This documentation is archived and is not being maintained.
TemplatedControlDesigner.GetTemplateContainerDataItemProperty Method
.NET Framework 1.1
Gets the data item property of the template's container.
[Visual Basic] Public Overridable Function GetTemplateContainerDataItemProperty( _ ByVal templateName As String _ ) As String [C#] public virtual string GetTemplateContainerDataItemProperty( string templateName ); [C++] public: virtual String* GetTemplateContainerDataItemProperty( String* templateName ); [JScript] public function GetTemplateContainerDataItemProperty( templateName : String ) : String;
Parameters
- templateName
- The name of the template.
Return Value
A string representing the data.
Example
[Visual Basic] The following code example overrides the GetTemplateContainerDataItemProperty method to return the string value DataItem to the designer surface.
[Visual Basic]
' Override the GetTemplateContainerDataSource to return the
' data source to be used by the templated control.
Public Overrides Function GetTemplateContainerDataSource(templateName As String) As IEnumerable
Return CType(Me, IDataSourceProvider).GetResolvedSelectedDataSource()
End Function
Public Overrides Function GetTemplateContainerDataItemProperty(templateName As String) As String
Return "DataItem"
End Function
[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
TemplatedControlDesigner Class | TemplatedControlDesigner Members | System.Web.UI.Design Namespace
Show: