![]() ![]() |
ESRI.ArcGIS.ADF.IMS | |
ID Property | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace > Layer Class : ID Property |
Visual Basic (Declaration) | |
---|---|
Public Overridable Property ID As String |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As Layer Dim value As String instance.ID = value value = instance.ID |
C# | |
---|---|
public virtual string ID {get; set;} |
This example prints the layer ID along with the layer name to a label web control. It assumes an existing MapView object.
C# | ![]() |
---|---|
FeatureLayer citiesLayer = (FeatureLayer) mapView.Layers.FindByName("Cities"); Label1.Text = citiesLayer.Name + " has an ID of " + citiesLayer.ID; |
Visual Basic | ![]() |
---|---|
Dim citiesLayer As FeatureLayer = CType(mapView.Layers.FindByName("Cities"), FeatureLayer) Label1.Text = citiesLayer.Name + " has an ID of " + citiesLayer.ID |
This property identifies the layer to the server. Each layer ID must be unique within the LayerCollection. The ID can be any combination of alpha and numeric characters. Do not use spaces in the ID. Do not use any special characters.
Set IDs only for layers you create as selection layers, dynamic layers, or acetate layers. Do not change the ID for layers in the map service. If you change the ID of a layer in the map service, the server will ignore any other settings for the layer, such as visibility, renderer or filter.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family