I'm trying to call a .NET webmethod using prototype ajax (code below).
but it does work. Is the code below the right approach?
//Server side code
[WebMethod]
public string msgfromserver()
{
return "msgfromserver";
}
//Client side code
function SendRequest(MSG)
{
document.getElementById("ResponseDiv").innerHTML="";
new Ajax.Request("mydotnettest.aspx/msgfromserver",
{
method: "post",
onSuccess: Successful,
onFailure: Failed,
onComplete: Respond
});
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---