Friday, July 3, 2009

ESRI Misleads the Public, Pt. 2

Once more, our friends in Redlands are trying to increase your already elevated blood pressure by posting erroneous code snippets.

In the 'Working with AJAX capabilities of the Web ADF' article' , they incorrectly state that the correct way of registering Map Callback results with the .NET Script Manager is to use the following snippet:

. . .
string jsProcessCallbackResult = string.Format("ESRI.ADF.System.processCallbackResult('{0}');", Map1.CallbackResults.ToString().Replace("\\", \\\\));

ScriptManager.RegisterClientScriptBlock(Page, sender.GetType(), "changeextent", string.Format(jsProcessCallbackResult, Map1.CallbackResults), true);

Well, someone probably just copied and pasted the wrong info. Here's how you do it:

string jsProcessCallbackResult = string.Format("ESRI.ADF.System.processCallbackResult('{0}');", Map1.CallbackResults.ToString().Replace("\\", \\\\));

ScriptManager.RegisterClientScriptBlock(Page, Map1.GetType(), "changeextent", jsProcessCallbackResult, true);

Overall, this whole way of working with the ADF is clunky, clumsy, and downright frustrating. I hope they're working on something a little slicker down there in Redlands.

No comments:

Post a Comment