Hi all,
The web service which am trying to call takes two string and three array as parameters.am able to call the web service through ajaxpro.dll, but through ajax framework1.0 its not coming. the service returns response class object..pls help me out.
In .aspx page
--------------------
<asp:ScriptManagerID="ScriptManager1"runat="server">
<Services>
<asp:ServiceReferencePath="http://localhost/progressTrack21/ManageProgressTracking.asmx"/>
</Services>
<Scripts>
<asp:ScriptReferencePath="trackingScript.js"/>
</Scripts>
</asp:ScriptManager>
<inputid="Button1"type="button"value="Click here"onclick="funProgress();return false;"/>
In trackingscript.js file
----------------
function funProgress(){
debugger;Sys.Net.WebServiceProxy.invoke("http://localhost/progressTrack21/ManageProgressTracking.asmx","Update",false,{"UserId1":"1","PlanId1":"1","SCOId1":scoid,"ElementName1":EleName,"Value1":EleName},SucceededCallback);
}
function SucceededCallback(result, eventArgs){
var RsltElem = document.getElementById("Results1");
alert(result);}
Are you getting any javascript error ??, because in your function you are directly accessing the results elements
function SucceededCallback(result, eventArgs)
{
var RsltElem = document.getElementById('<%=Results1.ClientID%>');
alert(result);}
Hi, You do not have to call the WebServiceProxy.invoke. Instead the Ajax Framework generates a JavaScript Proxy class which represents the Server Side Web Service.
For Example if Your WebService Name is DataService and if it contains a method FetchData(), then the JavaScript class will also contain a DataService class with the FetchData Method. You can find the more info from the following links:
http://ajax.asp.net/docs/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx
http://ajax.asp.net/docs/tutorials/ExposingWebServicesToAJAXTutorial.aspx
It is giving internal server error(500)....I tried in all possible ways...
Thank u Kazi,,,,
No comments:
Post a Comment