<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: QueryTask question in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30216#M788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes, you will have access to UserToken in the Completed event. See post# 4 in this thread &lt;A href="http://forums.arcgis.com/threads/19810-showing-related-records-in-maptips"&gt;http://forums.arcgis.com/threads/19810-showing-related-records-in-maptips&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any issues to use QueryTask.Token = "Token", I got a token with 120 minutes life time from the secured ArcGIS Server 10 web service, and it works well using &lt;/SPAN&gt;&lt;A href="http://......./?query/token=taokenstring"&gt;http://......./?query/token=taokenstring&lt;/A&gt;&lt;SPAN&gt; on IE, but run it from Silverlight C# code, it always shows me the error: SystemSecurityException. Is that an ESRI issue / bug? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;George&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Apr 2012 20:12:12 GMT</pubDate>
    <dc:creator>GeorgePan</dc:creator>
    <dc:date>2012-04-03T20:12:12Z</dc:date>
    <item>
      <title>QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30209#M781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way I can pass in my own parameters to QueryTask?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can have 2 or more QueryTask run asynchronously, and the completed event handler are invoked after each QueryTask is done.&amp;nbsp; I want to pass in a parameter to recognize which QueryTask I'm running.&amp;nbsp; Or is there a flag or property that I can detect?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 14:21:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30209#M781</guid>
      <dc:creator>ThaoNguyen</dc:creator>
      <dc:date>2011-03-28T14:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30210#M782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can pass in a value for the userToken when you invoke ExecuteAsync. See the reference for details &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.QueryTask~ExecuteAsync(Query,Object).html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.QueryTask~ExecuteAsync(Query,Object).html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 16:57:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30210#M782</guid>
      <dc:creator>DaveTimmins</dc:creator>
      <dc:date>2011-03-28T16:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30211#M783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can pass in a value for the userToken when you invoke ExecuteAsync. See the reference for details &lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.QueryTask~ExecuteAsync(Query,Object).html"&gt;http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.QueryTask~ExecuteAsync(Query,Object).html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually, I want to retrieve the value when the completed event handler is called so that I can use this value for something else.&amp;nbsp; I found QueryTask.Token helps me achieve this goal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can I retrieve userToken in completed event handler?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 19:04:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30211#M783</guid>
      <dc:creator>ThaoNguyen</dc:creator>
      <dc:date>2011-03-28T19:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30212#M784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, you will have access to UserToken in the Completed event. See post# 4 in this thread &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/19810-showing-related-records-in-maptips"&gt;http://forums.arcgis.com/threads/19810-showing-related-records-in-maptips&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 20:27:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30212#M784</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2011-03-28T20:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30213#M785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes, you will have access to UserToken in the Completed event. See post# 4 in this thread &lt;A href="http://forums.arcgis.com/threads/19810-showing-related-records-in-maptips"&gt;http://forums.arcgis.com/threads/19810-showing-related-records-in-maptips&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using QueryTask.&amp;nbsp; I've been adding new attributes to graphic and have no problem with that.&amp;nbsp; My question is different.&amp;nbsp; For each QueryTask, before it is executed, I want to set some values to QueryTask so that I can retrieve when the task is completed.&amp;nbsp; Just imagine QueryTask as a car. Before it runs, I put some cargos in that car, when it reaches my destination, I want to get my cargos back.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's like writing a jsp page, you can pass in parameters in url such as: &lt;/SPAN&gt;&lt;A href="http://www.mypage.com?myParam1=test1&amp;amp;myParam2=test2"&gt;http://www.mypage.com?myParam1=test1&amp;amp;myParam2=test2&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myParamx are what I mean, I want to pass along the parameters for my use later for each QueryTask.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I think QueryTask.Token works for me at this point.&amp;nbsp; Not really sure if it is safe to use for my case :).&amp;nbsp; I hope it is OK.&amp;nbsp; I don't see any reason for "unsafe".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 11:26:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30213#M785</guid>
      <dc:creator>ThaoNguyen</dc:creator>
      <dc:date>2011-03-29T11:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30214#M786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, this is possible with UserToken&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
IDictionary&amp;lt;string, object&amp;gt; parameters = new Dictionary&amp;lt;string, object&amp;gt;();
parameters["param1"] = 1;
parameters["param2"] = "one";
QueryTask qt = new QueryTask();
Query q = new Query();
qt.ExecuteCompleted += (s, e) =&amp;gt;
{
 var myParams = e.UserState as IDictionary;
 var param1 = (int)myParams["param1"];
 var param2 = (string)myParams["param2"];
};
qt.ExecuteAsync(q, parameters);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:12:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30214#M786</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-10T21:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30215#M787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes, this is possible with UserToken&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
IDictionary&amp;lt;string, object&amp;gt; parameters = new Dictionary&amp;lt;string, object&amp;gt;();
parameters["param1"] = 1;
parameters["param2"] = "one";
QueryTask qt = new QueryTask();
Query q = new Query();
qt.ExecuteCompleted += (s, e) =&amp;gt;
{
 var myParams = e.UserState as IDictionary;
 var param1 = (int)myParams["param1"];
 var param2 = (string)myParams["param2"];
};
qt.ExecuteAsync(q, parameters);
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That's great!!! It is what I'm looking for.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30215#M787</guid>
      <dc:creator>ThaoNguyen</dc:creator>
      <dc:date>2021-12-10T21:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30216#M788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes, you will have access to UserToken in the Completed event. See post# 4 in this thread &lt;A href="http://forums.arcgis.com/threads/19810-showing-related-records-in-maptips"&gt;http://forums.arcgis.com/threads/19810-showing-related-records-in-maptips&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any issues to use QueryTask.Token = "Token", I got a token with 120 minutes life time from the secured ArcGIS Server 10 web service, and it works well using &lt;/SPAN&gt;&lt;A href="http://......./?query/token=taokenstring"&gt;http://......./?query/token=taokenstring&lt;/A&gt;&lt;SPAN&gt; on IE, but run it from Silverlight C# code, it always shows me the error: SystemSecurityException. Is that an ESRI issue / bug? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;George&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 20:12:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30216#M788</guid>
      <dc:creator>GeorgePan</dc:creator>
      <dc:date>2012-04-03T20:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: QueryTask question</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30217#M789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there a way I can pass in my own parameters to QueryTask?&lt;BR /&gt;I can have 2 or more QueryTask run asynchronously, and the completed event handler are invoked after each QueryTask is done. I want to pass in a parameter to recognize which QueryTask I'm running. Or is there a flag or property that I can detect?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;As Dave mentionned, you can set a userToken when you invoke ExecuteAsync. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then when the query has completed, we'll get this userToken as 'UserState' property of the returned &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.QueryEventArgs_members.html"&gt;QueryEventArgs&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Apr 2012 09:41:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/querytask-question/m-p/30217#M789</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2012-04-04T09:41:21Z</dc:date>
    </item>
  </channel>
</rss>

