After starting fresh this morning I think I have answered my
question(s) above as follows:

1) Using json in c# with AjaxPro - this example successfuly
deserializes a json string containing an array of javascript objects.

      string strJson = Convert.ToString(Request.Form["jsonData"]);
      //strJson = strJson.Replace("undefined", "\"undefined\"");
      AjaxPro.JavaScriptArray jar =
(AjaxPro.JavaScriptArray)AjaxPro.JavaScriptDeserializer.Deserialize(strJson,
typeof(AjaxPro.JavaScriptArray));
      for (int i = 0; i < jar.Count; i++)
      {
         jso = (AjaxPro.JavaScriptObject)jar[i];
         strAttachments += "<img src=\"" +
Convert.ToString(jso["icon"]) + "\">&nbsp;" +
Convert.ToString(jso["name"]) + "<br/>";
      }

2) What does the error "word u" mean?
My json string was generated from a legacy system running asp.classic.
Somewhere along the way a value of undefined was serialized to
undefined without quotes.  The "u" in "word u" was a reference to the
first letter of the offending text.  You can see my 2nd line above (now
commented out) was my first solution.  I have since had the programmer
maintaining the legacy system adjust for this on his side.

Next step:  Figure out how to use dojo.bind from our legacy asp.classic
app to get data from asp.net app.

I really like what I have seen with AjaxPro so far and I can see that
we will probably be using it a lot.  I just wish there was better
documentation.  Since this project must take an awful lot of Michaels
time has there been any thoughts to setting up a documentation wiki
that we all can contribute to?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at 
http://www.ajaxpro.info/

Don't forget to read my blog at http://weblogs.asp.net/mschwarz/

The open source project is now located at 
http://www.codeplex.com/Wiki/View.aspx?ProjectName=AjaxPro
-~----------~----~----~----~------~----~------~--~---

Reply via email to