_XDocument3.SetDataVariable(Int32, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the value of a predefined variable stored as a processing instruction attribute in the form's underlying XML document.
public:
void SetDataVariable(int lVariableNumber, System::String ^ bstrVariableValue);
public void SetDataVariable (int lVariableNumber, string bstrVariableValue);
abstract member SetDataVariable : int * string -> unit
Public Sub SetDataVariable (lVariableNumber As Integer, bstrVariableValue As String)
Parameters
- lVariableNumber
- Int32
The number of the variable.
- bstrVariableValue
- String
The value of the variable.
Implements
Examples
In the following example, the SetDataVariable method of the XDocument object is used to set the value of the first variable:
thisXDocument.<span class="label">SetDataVariable</span>(1, "View 2");
Remarks
If the variable being set is not a valid processing instruction attribute, the SetDataVariable method will return an error.
To get the value of a variable, use the GetDataVariable(Int32) method.
Note: Microsoft Office InfoPath only supports using the initialView
variable, which is the variable used to specify the initial view displayed when a form is opened. The number of this variable is always 1, and its value must be the name of a view within the form.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기