Select to view content in your preferred language

Query task result failed to update after features created or delete in Silverlight Ap

730
4
02-24-2011 05:35 AM
XiujuZhou
Emerging Contributor
I have silverlight application which can create new or delete feature using ArcGIS API 2. after a feature created or deleted, I do query by WCR_NUM (see below, a WCR_NUM contain one more features), the result of the featureSet still includes the deleted feature or not includes new created feature, which means the query result is not updated. Please help!

QueryTask queryTask;
ESRI.ArcGIS.Client.Tasks.Query query;
queryTask = new QueryTask("http://mapserver2.pwe.pserv.coh.gov/ArcGIS/rest/services/WCRPolygon/MapServer/0"); queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted;
queryTask.Failed += QueryTask_Failed;
query = new ESRI.ArcGIS.Client.Tasks.Query();
query.OutFields.Add("*");
query.Where = "WCR_NUM='" + WCRNUM + "' and STATUS='Active'"; query.ReturnGeometry = true;
queryTask.ExecuteAsync(query);
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
Did you set 'DisableClientcaching' to true?
0 Kudos
XiujuZhou
Emerging Contributor
Did you set 'DisableClientcaching' to true?


Where to set it up? I don't know where it is.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
The QueryTask class has a property 'DisableClientCaching' that can be set to true to prevent the request from being looded from the browser's cache.
0 Kudos
XiujuZhou
Emerging Contributor
The QueryTask class has a property 'DisableClientCaching' that can be set to true to prevent the request from being looded from the browser's cache.


Thank you dbroux. great idea. I got it.
0 Kudos