Gets the value of a matching field.
Syntax

[C#]

string Value(string inField);

[Visual Basic]

Function Value(inField As String) As String
Params
Name Description
inField The field to be queried.
return The value of a matching field.
Notes

This function returns the text value of the first matching field found. If no matching field is found an empty string is returned.

For details of the way in which IPTC items can be referred to by name see Add.

See Also

Item[Int32]

Item[String]

Values

Example

[C#]XImageLoadOptions loadOptions = new XImageLoadOptions();
loadOptions.ReadIPTC = true;
XImage image = XImage.FromFile(Server.MapPath("rez/iptc.tif"), loadOptions);
if (image.IPTC != null) {
  Response.Write(image.IPTC.Value("Headline"));
  Response.Write("<br>");
  Response.Write(image.IPTC.Value("Caption"));
  Response.Write("<br>");
}


[Visual Basic]Dim loadOptions As New XImageLoadOptions()
loadOptions.ReadIPTC = True
Dim image As XImage = XImage.FromFile(Server.MapPath("rez/iptc.tif"), loadOptions)
If image.IPTC IsNot Nothing Then
  Response.Write(image.IPTC.Value("Headline"))
  Response.Write("<br>")
  Response.Write(image.IPTC.Value("Caption"))
  Response.Write("<br>")
End If


This example writes the Headline and Caption from a TIFF file. No error will be raised if the IPTC data does not contain a headline or caption.