In my webMethod code I format the strings returned to the control...
String.Format("{0,12} - {1}", objectId, objectText);
What this does is pad the id value to the size of 12 characters, I want them all to line up when displayed to the user.
The formatting is intact all the way until I do a "return lst.ToArray();" out of the webmethod.
However, when the list is displayed in the extender, all leading spaces are removed, as are the spaces around the hyphen separating the two parts of the string. I want the string returned as is, how do you do that?
Comments: It seems that Sys.Serialization.JavaScriptSerializer.deserialize located in MicrosoftAjax.debug.js corrupts response data during parameters validation. This is the file which AJAX Control Toolkit has no control over, so you actually cannot use whitespace-formatted strings in AutoCompelete extender completion list items.
String.Format("{0,12} - {1}", objectId, objectText);
What this does is pad the id value to the size of 12 characters, I want them all to line up when displayed to the user.
The formatting is intact all the way until I do a "return lst.ToArray();" out of the webmethod.
However, when the list is displayed in the extender, all leading spaces are removed, as are the spaces around the hyphen separating the two parts of the string. I want the string returned as is, how do you do that?
Comments: It seems that Sys.Serialization.JavaScriptSerializer.deserialize located in MicrosoftAjax.debug.js corrupts response data during parameters validation. This is the file which AJAX Control Toolkit has no control over, so you actually cannot use whitespace-formatted strings in AutoCompelete extender completion list items.