Hola chicos del foro
estoy haciendo pruebas acerca de la conexion entre el ajax de jquery y el .nett, pero ando atascado.. aver si uds me echan una manita... coloco lo que llevo..
 
 <script type = "text/javascript">
        jQuery(document).ready(function() {
            $('#btnPrueba').click(function() {
                var nombre = $('#txtNombre').val();
                var apellido = $('#txtApellido').val();
 
                if (nombre && (nombre != ''))
                    sendDataAjax(nombre, apellido);
            });
        });
 
        function sendDataAjax(nombre, apellido) {
            var actionData = "{'nombre': '" + nombre + "','apellido': '" + apellido + "'}";
 
            $.ajax(
            {
                url: "listPersonas.aspx/GetDataAjax",
                data: actionData,
                dataType: "json",
                type: "POST",
                contentType: "application/json; charset=utf-8",
                success: function(msg) { alert(msg.d); },
                error: function(result) {
                    alert("ERROR " + result.status + ' ' + result.statusText);
                }
            });        
        };
    </script> 
 
 
Ese es el codigo que uso para conectarme a una funcion en el archivo .vb
 
 
    <System.Web.Services.WebMethod(True)> Public Function GetDataAjax(ByVal nombre As String, ByVal apellido As String) As String
        Dim a As String
        a = "Hola nuevo" + nombre + apellido
        Return a
    End Function
 
los encabezados que uso son los siguientes
 
Imports System.Web.Services.WebMethodAttribute
Imports System.Web.Script.Services.ScriptServiceAttribute
 
 
 
y el resultado que arroja es
En el firebug
 
http://localhost:2439/(S(z2jzeq45qxhboofs41adrwzl))/listPersonas.aspx/GetDataAjax
 
 
ERROR 500 Internal Server Error
 
Me pueden guiar que esta mal??.. gracias 
  
 

