How to get the field values of a feature from a QueryTask result?

3913
2
Jump to solution
04-11-2011 09:59 AM
SuiHuang
Occasional Contributor II
Hi Everybody:

    In a SilverLight 4 application, I used a ESRI.ArcGIS.Client.Tasks.QueryTask object to query an ArcGIS Server feature layer.
    I want to get the attribute value of a specific field from the returned result, such that I can do further process with it in C# code. However, I cannot find the way how to do that, even though I had successfully binded the values to a data grid in GUI.
    Can you give me some idea on that?
    Thank you!

The development environment I am using is:
-- .Net 4
-- SilverLight 4
-- Template by ESRI --> ESRI Silverlight TabbedRibbon Map Application
-- C#
-- Windows XP SP3
-- Map service provided by ESRI --> http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer/11
0 Kudos
1 Solution

Accepted Solutions
ScottFriedrich
New Contributor III
Hello,

The returned featureset contains Graphics, and you can retrieve your values from their Attribute collection...i.e.

graphic.Attributes["PARCEL_ID"].ToString();

Hope that helps,

Scott

View solution in original post

0 Kudos
2 Replies
ScottFriedrich
New Contributor III
Hello,

The returned featureset contains Graphics, and you can retrieve your values from their Attribute collection...i.e.

graphic.Attributes["PARCEL_ID"].ToString();

Hope that helps,

Scott
0 Kudos
by Anonymous User
Not applicable
Original User: huangs3

Thank you Scott!

Hello,

The returned featureset contains Graphics, and you can retrieve your values from their Attribute collection...i.e.

graphic.Attributes["PARCEL_ID"].ToString();

Hope that helps,

Scott
0 Kudos