我总是在博客中看到这样的代码:
$.ajax({
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    url: "WebService.asmx/HelloWorld",
                    data: "{}",
                    dataType: "json",
                    success: function(msg) {
                        alert(msg.d);
                    }
                });
但我认为这仅适用于 asp.net 3.5。我无法使用 2.0 运行它。如何在我的应用程序中使用这些代码?