I'm not sure where you got your code examples from, but there's lots
of blog posts showing valid and working examples

http://www.google.com/search?q=asp.net+web+service+jquery



On Dec 12, 8:07 am, Sara <[email protected]> wrote:
> 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