jQuery Ajax Aufruf nicht webmethod nach der url-routing

meine jquery ajax-Funktion nicht aufrufen webmethod. jquery Funktion Rückgabe webservice-Seite html.
Funktion ist nicht zu verstehen "ebulten_add" ist eine webmethod!

"url:ajaxPage.aspx/e_bulten"

schreiben webmethod Namen hat oder nicht schreiben ist das gleiche.. beide zurück ajaxPage.aspx-html.

$.ajax({
                type: "POST",
                url: 'ajaxPage.aspx/ebulten_Add',
                data: "{ebEmail:'" + Ebemail + "'}",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {

                    $("#span_result").hide();
                    $("#span_spinner").hide();
                    $("#span_result").html(result.d).fadeIn();
                },
                error: function (msg) {                     
                    $("#span_result").hide();
                    $("#span_spinner").hide();
                    $("#span_result").html("Lütfen tekrar deneyin.").fadeIn();
                }
            });`

web-Methode in ajaxPage.aspx

    [System.Web.Services.WebMethod]
public static string ebulten_Add(string ebEmail)
{
    if (ebEmail == "Email")
    {
        return "*Bilgilerinizi Girmediniz";
    }
    else
    {
        List<ListItem> ebList = new List<ListItem>();           
        ebList.Add(new ListItem("@Eb_email", ebEmail));
        BL.Atom.GetByVoid("spEbulten_Add", ebList);
        return "*E-Bülten kaydınız başarıyla tamamlanmıştır";            
    }
}

InformationsquelleAutor erkan demir | 2011-08-16

Schreibe einen Kommentar