ESRI.ArcGIS.ADF.Web.UI.WebControls
Fields Property
See Also  Example
ESRI.ArcGIS.ADF.Web.UI.WebControls Namespace > MapTips Class : Fields Property




The fields that will be displayed in map tips. Read-only property.

Syntax

Visual Basic (Declaration) 
<ObsoleteAttribute("Not valid for use with LayerFormat property")>
<NotifyParentPropertyAttribute(True)>
<PersistenceModeAttribute()>
<ResDescriptionAttribute("")>
<BrowsableAttribute(False)>
Public ReadOnly Property Fields As StringCollection
Visual Basic (Usage)Copy Code
Dim instance As MapTips
Dim value As StringCollection
 
value = instance.Fields
C# 
[ObsoleteAttribute("Not valid for use with LayerFormat property")]
[NotifyParentPropertyAttribute(true)]
[PersistenceModeAttribute()]
[ResDescriptionAttribute("")]
[BrowsableAttribute(false)]
public StringCollection Fields {get;}

Return Value

Collection of strings for fields displayed.

Example

The following example displays the names of fields used in the maptips. The code assumes a label control called Label1 and a Maptips control with an ID of Maptips1 are present on the page.
Visual BasicCopy Code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

    Label1.Text = "Maptips fields: "

    For Each s As String In MapTips1.Fields

        Label1.Text += s + " "

    Next

End Sub

C#Copy Code
protected void Page_Load(object sender, System.EventArgs e) 



    Label1.Text = "Maptips fields: "; 

    foreach (string s in MapTips1.Fields) 

    { 

        Label1.Text += s + " "; 

    } 



    

Remarks

This method retrieves a string collection of the fields in the maptips layer that are used in the header (HeaderFormatString) or body (BodyFormatString) of the maptip.

See Also

© 2010 All Rights Reserved.