get_AltText method
The get_AltText method gets the primary or alternative character data that is associated with a field.
.NET only: For VBScript, use AltText property instead.
Primary and alternative values are stored in ASCII format
in the page XML file, as shown in the following example:
<F id="Vendor">
<V n="TYPE">Vendor</V>
<V n="Position">0,0,0,0</V>
<V n="STATUS">1</V>
<C n="6,8,10" cr="0,0,0,0">83,49,68</C>
<C n="6,8,10" cr="0,0,0,0">116,50,97</C>
<C n="6,8,10" cr="0,0,0,0">105,51,116/C>
<C n="6,8,10" cr="0,0,0,0">110,52,97</C>
</F>
For the fourth character, the primary text value is 110.
The first alternative text value is 52, and the second alternative
text value is 97.Syntax
- C#
string get_AltText(int nIndex)
Applies to
Field objects only.Arguments
- nIndex
- 0 specifies the primary value. When the field contains multiple recognition, voting, or multiple-pass data entry values, 1 specifies the first alternative, 2 specifies the second alternative, and so on.
Returns
String containing the alternative text.Example
This example gets the second alternative text value from the Vendor field. Using the page XML example, the returned string is 68,97,116,97. The root of the search in this case is the page DCO.string sAltText = m_oDCOPage.FindChild("Vendor").get_AltText(2);