How to format the results of the IdentifyTask programatically

Discussion created by stevel on Jul 25, 2011
Latest reply on Jul 25, 2011 by DSwingley-esristaff
Using the IdentifyTask, is it possible to:

1) control which attributes will be returned?
2) show aliases instead of field names?

As far as I can see, the IdentifyResults contain all attributes of the feature, and do not contain the aliases.

I'm trying to make a generic Identify tool, which will work on all layers without hard-coding the attributes and aliases. For this to work, I need to be able to specify which attributes to display, and to access their aliases.

Since IdentifyParameters can work across multiple layers, it doesn't have the option to specify which layers should be returned.

Are there any options which would allow a generic Identify tool to work?