FieldTemplateFactory.BuildVirtualPath Method (String, MetaColumn, DataBoundControlMode)

 

Builds the virtual path to a field template based on the field template name and the mode.

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

public virtual string BuildVirtualPath(
	string templateName,
	MetaColumn column,
	DataBoundControlMode mode
)

Parameters

templateName
Type: System.String

The name of the template to use.

column
Type: System.Web.DynamicData.MetaColumn

Specifies the data column which the field template applies to.

mode
Type: System.Web.UI.WebControls.DataBoundControlMode

Specifies the display mode of the field template.

Return Value

Type: System.String

The virtual path to the field template.

Exception Condition
ArgumentNullException

templateName is null.

By default, this method builds the virtual path to a field template by using the template name, appending the mode and then adding a .ascx extension. For example, if templateName is MyFieldTemplate and mode is Edit, then the virtual path will be MyFieldTemplate_Edit.ascx, in the folder specified by the Template folder virtual path.

.NET Framework
Available since 3.5
Return to top
Show: