获取呈现字段中使用的模板的名称。
命名空间: Microsoft.SharePoint.Mobile.WebControls
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Overrides ReadOnly Property TemplateName As String
Get
用法
Dim instance As SPMobileListFieldIterator
Dim value As String
value = instance.TemplateName
public override string TemplateName { get; }
属性值
类型:System.String
String 值,该值代表模板用于呈现字段的名称。
备注
下表演示如何返回值而异的项是否是一个文件夹和列表视图页上,是否显示窗体或某些其他表单。
PAGETYPE |
当前项目是一个文件夹 |
当前项目不是一个文件夹 |
|---|---|---|
列表视图 |
"MobileFolderIterator" |
"MobileItemIterator" |
显示表单 |
"MobileDisplayFolderContents" |
"MobileDisplayItemContents" |
其他窗体 |
"MobileFolderContents" |
"MobileItemContents" |
The TemplateName property holds the value of the ID attribute of a <RenderingTemplate> element in the file MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx located in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\CONTROLTEMPLATES. You must not modify MobileDefaultTemplates.ascx or GbwMobileDefaultTemplates.ascx, but you can override this template by creating another <RenderingTemplate> element with the same ID in a custom *.ascx file in the ...\CONTROLTEMPLATES folder. See Walkthrough: Customizing the Mobile Home Page for an example of the process of modifying the rendering of mobile controls.
如果当前上下文,列表视图和窗体都不被返回基本模板的名称。