Sunday, March 11, 2012

Passing Complex Types

You need to include that type with a ScriptIncludeAttribute on your webservice. ASP.NET AJAX doesn't make all types available, that would be unwieldy. So, you have to "opt-in" a type via this attribute.

Normally types referred to by a webservice are automatically included (such as types of parameters, return values, etc). Sometimes the type you want isn't explicitly in the webservice signature, so theres the attribute.

If your type isn't in the method signature, you can make it available in the client script using the GenerateScriptTypeAttribute.



No comments:

Post a Comment