Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6350125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T21:45:14+00:00 2026-05-24T21:45:14+00:00

my jquery ajax function is not calling webmethod. jquery function return webservice page’s html.

  • 0

my jquery ajax function is not calling webmethod. jquery function return webservice page’s html.
function is not understand “ebulten_add” is a webmethod!

“url:ajaxPage.aspx/e_bulten”

to write webmethod name or not write is same.. both of return 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 method 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";            
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T21:45:15+00:00Added an answer on May 24, 2026 at 9:45 pm

    Agree with @SenadM. Either change the dataType:text or return JSON from your webmethod:

    [System.Web.Services.WebMethod]
    public static string ebulten_Add(string ebEmail)
    {
        if (ebEmail == "Email")
        {
            return "{ \"response\": \"*Bilgilerinizi Girmediniz\"}";
        }
        else
        {
            List<ListItem> ebList = new List<ListItem>();           
            ebList.Add(new ListItem("@Eb_email", ebEmail));
            BL.Atom.GetByVoid("spEbulten_Add", ebList);
            return "{ \"response\": \"*E-Bülten kaydiniz basariyla tamamlanmistir\"}";            
        }
    }
    

    Also, make sure POST is enabled in your web.config:

    <configuration>
        <system.web>
        <webServices>
            <protocols>
                <!-- <add name="HttpGet"/> --> <!-- uncomment to enable get -->
                <add name="HttpPost"/>
            </protocols>
        </webServices>
        </system.web>
    </configuration>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the following JQuery/AJAX function I'm calling a partial view when an option is
In jQuery ajax function there is xhr option. Does someone know more details, usability
I'm using the JQuery AJAX function to deliver data to a PHP doc. Currently,
I have a jquery-ajax function that sends data to a php script and the
I have written a simple jQuery.ajax function which loads a user control from the
How to pass multiple checkboxes using jQuery ajax post this is the ajax function
I am using the jQuery $.ajax() function. I have put this into a parent
I'm trying to get an jquery ajax callback function to update the background colour
It seems that i cannot access $(this) inside jquery ajax success function. please see
I am using the $.ajax function in jquery to make a call to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.