views:

149

answers:

2

I know there's a way to call [WebMethod] via jQuery ($.ajax(...)) I was wondering if it's possible to call [ScriptableMember] via jQuery.

A: 

It's just javascript. Maybe not the jquery ajax method, but that doesn't really mean much.

Some plugins do have calls to the ajax method built in, but they're usually not too hard to modify if necessary.

Walkthrough: Calling Managed Code from JavaScript.

Tom Clarkson
The only problem is that this makes a synchronous call. I was hoping for a asynchronous call. Hence I asked about jquery.
ra170
Synchronous methods can be called asyncronously - just search for something more generic like asynchronous javascript - you don't need anything specific to scriptablemember.
Tom Clarkson
A: 

jQuery ($.ajax()) methods are design to call ajax methods via URL or at least you need to specify url in short form, i.e something.php, so the short answer is that this is not possible. I went with my original design which was to call javascript from C# (managed code) and vice-versa.

ra170