Author: mittalpa | Posted on: 6/10/2008 11:03:13 AM | Views : 819

 Hi

I have a webpage and webservice on localhost in different project. In different virtual directories. I want to call webservice function as follows and alert it onComplete.

---------------------------

function Button1_onclick() {
    ret = SimpleWebServices.SimpleService.SayHello(document.getElementById('Text1').value, OnComplete, OnTimeOut, OnError);
return(true);
}

function OnComplete(arg) {
alert(arg);
}


-------------

Webservice code is very simple..

namespace SimpleWebServices
{
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.Web.Script.Services.ScriptService()]
    public class SimpleService : System.Web.Services.WebService
    {
  & ...

Go to the complete details ...