Duration (Pacific Standard Time):
To (Pacific Standard Time):
Impact:
User Action:

DynamicDataExtensions.FindFieldTemplate Method (Control, String)

 

Returns the field template for the specified column in the specified control's naming container.

Namespace:   System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

<ExtensionAttribute>
Public Shared Function FindFieldTemplate (
	control As Control,
	columnName As String
) As Control

Parameters

control
Type: System.Web.UI.Control

The containing control.

columnName
Type: System.String

The name of the column.

Return Value

Type: System.Web.UI.Control

The field template for the specified column in the specified control's naming container.

The following example shows how to find the text box control for a specified column name. In example, the Dynamic Data page templates are copied to the \DynamicData\CustomPages\ProductDescriptions folder to provide a custom display for the ProductDescription table of the AdventureWorksLT database. The Insert.aspx file markup is changed to add an OnDataBound event handler named DetailsView1_DataBound, in which the FindDataSourceControl method is called to find a text box control.

No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
.NET Framework
Available since 3.5
Return to top