After some effort I came up with the below. BTW: Thanks Rex Hanson for realizing that some of us might need to do this outside of ESRI: http://rexdotnet.blogspot.com/2009/11/using-arcgis-server-rest-api-in-net.html Next Dev Summit I owe you a beer!Flex:queryTask.execute(query, new AsyncResponder(onResult, onFault));
function onResult(featureSet:FeatureSet, token:Object = null):void
{
jsonResults = featureSet.toJSON();
var request:URLRequest = new URLRequest("http://bwiespape/GeotechExample2ASP/simple.aspx");
request.data = { j: jsonResults};
// if you don't need a file back you could just as easily use HTTPService here
var fileRef:FileReference = new FileReference();
fileRef.download(request,"report.pdf");
}
ASP.netProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim serializer As JavaScriptSerializer
Dim nvc As NameValueCollection = Request.Form
Dim responseString As String = nvc("j")
serializer = New JavaScriptSerializer()
If responseString IsNot Nothing Then
Dim results As IDictionary(Of String, Object) = TryCast(serializer.DeserializeObject(responseString), IDictionary(Of String, Object))
If results IsNot Nothing AndAlso results.ContainsKey("features") Then
Dim features As IEnumerable(Of Object) = TryCast(results("features"), IEnumerable(Of Object))
For Each feature As IDictionary(Of String, Object) In features
Dim attributes As IDictionary(Of String, Object) = TryCast(feature("attributes"), IDictionary(Of String, Object))
Dim project_nu As String = TryCast(attributes("Project_Nu"), String)
Dim pointid As String = TryCast(attributes("PointID"), String)
Dim east As Double = Decimal.ToDouble(CDec(attributes("East")))
Dim north As Double = Decimal.ToDouble(CDec(attributes("North")))
'Do Something with your results, array, whatever
Next
End If
End If
End Sub