hi every body

I want to call a webmethod of my webservice and to do this I try the 3
follwing methods but none of them show me the result and nothing
happen
It also has no error
please help me

Method 1:

jQuery.getJSON("WebService.asmx/HelloWorld" , function(json){
     jQuery("#result").html(json);
        });
Method 2:

jQuery.ajax({
    type: "POST",
    url: "WebService.asmx/HelloWorld",
    data: "{}",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    success: function(msg) {
      jQuery("#result").html(msg);
    }
  });

Method 3:

jQuery.ajaxDotNet("WebService.asmx/HelloWorld" , {
                verb: "GET",
                success: function(obj) {
                        jQuery("#result").html(obj);
                }
        });


Webmethod Code:

 <WebMethod()> _
    Public Function HelloWorld() As String
        Return "Hello World"
    End Function

Reply via email to