_XDocument3.InputParameters 属性

定义

获取一个 InputParameterCollection 对象,该对象包含使用 /InputParameters 命令行选项指定的任何输入参数,或使用 URL 中的查询参数指定。

public:
 property Microsoft::Office::Interop::InfoPath::SemiTrust::InputParameterCollection ^ InputParameters { Microsoft::Office::Interop::InfoPath::SemiTrust::InputParameterCollection ^ get(); };
public Microsoft.Office.Interop.InfoPath.SemiTrust.InputParameterCollection InputParameters { get; }
member this.InputParameters : Microsoft.Office.Interop.InfoPath.SemiTrust.InputParameterCollection
Public ReadOnly Property InputParameters As InputParameterCollection

属性值

包含 InputParameterCollection 输入参数的 对象。

示例

在下面的示例中,InfoPath 表单模板是使用以下语法从命令行打开的:

infopath.exe“C:\User Forms\DeptReport.xsn” /InputParameters “Dept=Accounting”

string vDept = (_XDocument3)thisXDocument.InputParameters["Dept"];
Dim vDept As String = 
   DirectCast(thisXDocument, _XDocument3).InputParameters("Dept")

在下面的示例中,InfoPath 表单模板是使用以下语法从命令行打开的:

infopath.exe“C:\User Forms\DeptReport.xsn” /InputParameters “Dept=Accounting”

string vDept = (_XDocument3)thisXDocument.InputParameters["Dept"];
Dim vDept As String = 
   DirectCast(thisXDocument, _XDocument3).InputParameters("Dept")

注解

输入参数由一个或多个名称/值对组成,这些名称/值对由使用 /InputParameters 命令行选项从命令行或批处理文件打开表单模板时指定的和 (&) 字符分隔。 还可以在通过 URL 打开表单模板时使用查询参数来指定输入参数。

由于 InputParameters 属性是 Microsoft InfoPath 的新增属性,因此必须声明并强制转换为 _XDocument3 类型才能访问此方法。 有关详细信息,请参阅如何:使用与 InfoPath 2003 不兼容的对象模型成员。

此成员只能由与当前打开的表单在相同域中运行的表单访问,或者由已授予跨域权限的表单访问。

适用于