Table of contents
TOC
折叠目录
展开目录

WebHiddenFields.Add 方法 (发布服务器)WebHiddenFields.Add Method (Publisher)

office 365 dev account|上次更新日期: 2018/3/13
|
3 参与人员

将新的隐藏的字段添加到 Web 窗体并返回Long值,表明WebHiddenFields集合中的新字段的数目。新字段总是置于当前字段列表的末尾。Adds a new hidden field to a Web form and returns a Long indicating the number of the new field in the WebHiddenFields collection. New fields are always placed at the end of the current field list.

语法Syntax

表达式添加名称,而expression. Add( Name, Value)

_expression_A 表示WebHiddenFields对象的变量。_expression_A variable that represents a WebHiddenFields object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
名称Name必需RequiredStringString新域的名称。The name of the new field.
Value必需RequiredStringString新域的值。The value of the new field.

返回值Return Value

LongLong

示例Example

以下示例将新的隐藏域添加到指定的 Web 命令按钮控件。为了使本示例生效,活动出版物的第一页上的第一个形状必须是 Web 命令按钮控件。The following example adds a new hidden field to the specified Web command button control. Shape one on page one of the active publication must be a Web command button control for this example to work.

ActiveDocument.Pages(1).Shapes(1) _ 
 .WebCommandButton.HiddenFields _ 
 .Add Name:="subject", Value:="service request"
© 2018 Microsoft