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 8179269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:57:51+00:00 2026-06-06T23:57:51+00:00

I was working on some code, and cant seem to see why this is

  • 0

I was working on some code, and cant seem to see why this is always failing. I had tried to debug it, but the asp page is is referencing will not hit a breakpoint. (Hint maybe that it isnt fetching the page??). for the data: part i had it right before the post trying to see if it would do JSON.stringify({variables}) to see if that worked as well, but it did not

Is there something that I am doing wrong here?

$.ajax({
        type: 'POST',
        url: 'AutoComplete.asmx/getWebFormDesignFieldContents',
        data: {
            'fe_name': "*",
            'count': 200,  //this might need to be adjusted slightly.  I may want to make it more OR less.
            'also_search_fe_desc': true,
            'opts': opts
        },
        contentType: 'application/json; charset=utf-8',
        dataType: 'json',
        success: function (result) {
            //success
            $("div.modal").replaceWith($(result));
            $("div.modal").fadeIn();
        },
        error: function (result) {
            //error
            //alert("Error: "+result.statusText);
            $("div.overlay").fadeOut();
        }
    });

On the serverside portion of ASP I have:

public String getWebFormDesignFieldContents(String fe_name, int count, bool also_search_fe_desc, String opts)
{
   String retValue = "";
   ...
   return retValue;
}
  • 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-06-06T23:57:52+00:00Added an answer on June 6, 2026 at 11:57 pm

    You need to decorate your method with [WebMethod] attribute

    [WebMethod]
    public String getWebFormDesignFieldContents(
         String fe_name, 
         int count, 
         bool also_search_fe_desc, 
         String opts)
    

    Something else you need to change is your json format. You have to pass a string.

    data:'{"fe_name": "*", "count": 200, "also_search_fe_desc": true, "opts":' + opts + '}'
    

    You could use JSON.stringify but take into account that old browsers don’t have support for it so you may need to handle that situation.

    You’ll also need to work on your return logic. For now I just see you return an empty string. If you show more code we could help you with that too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some working code that I altered but I can't seem to get
I'm working with some example code that draws an arc using CGPaths. I've had
I've been working on this for a while now and I cant seem to
I'm working some code that inserts csv rows into an SQLite database using Python.
I've been re-working some code due to a memory leak. The code is part
Working on some code for a machine problem; we've just started working with pointers,
I'm working on some code that reads from a socket, and it goes wrong
I'm working on some code to insert a link to a dupe in the
I am working on some code, basically I have a form. On that form
I'm working with some code that I've found online and I don't quite understand

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.