PDA

View Full Version : Execute Ajax/Direct Event from Client-Side?



Tbaseflug
Dec 02, 2010, 3:24 PM
Is there anyway to call a direct/ajax event from client side? Using the msg box example - on "yes" button click - I would like to execute an ajaxevent... Possible?


function showResultText (btn, text) {
//Fire ajaxevent below
};

geoffrey.mcgill
Dec 02, 2010, 4:12 PM
You should call a DirectMethod directly from JavaScript.

Tbaseflug
Dec 16, 2010, 5:31 PM
This is killingme - before 1.0 - what was there before DirectMethod?

geoffrey.mcgill
Dec 16, 2010, 6:27 PM
Hi,

In v1.0, the old [AjaxMethod] was renamed to [DirectMethod].

Hope this helps.

Tbaseflug
Dec 16, 2010, 6:30 PM
Perfect - thanks - for some reason just blanked completely on it - saved my day

geoffrey.mcgill
Dec 16, 2010, 6:35 PM
Monitoring the CHANGELOG.txt is always a good place for reviewing these kind of changes.


17. Renamed AjaxMethodAttribute to DirectMethodAttribute.

Example (Old)

[AjaxMethod]
public void DoSomthing() { }

Example (New)

[DirectMethod]
public void DoSomthing() { }

Hope this helps.