Posted By

FMalk on 01/06/11


Tagged

ajax Net json JSONP asmx


Versions (?)

Filter JSON->JSONP for .NET 3.5


 / Published in: C#
 

URL: http://bloggingabout.net/blogs/adelkhalil/archive/2009/08/14/cross-domain-jsonp-with-jquery-call-step-by-step-guide.aspx

The filter only needs to know which requests need to be returned as JSONP, doesn't care how. Modify "OnBeginRequest" accordinly. If original .asmx doesn't return JSON, extend it like example shows. JSONP only works for GET requests, so don't forget to change [ScriptMethod] if needed.

Report this snippet  

You need to login to post a comment.