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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:09:49+00:00 2026-05-14T17:09:49+00:00

I have a JSON request, but it seems that it is not hitting the

  • 0

I have a JSON request, but it seems that it is not hitting the controller. Here’s the jQuery code:

$("#ddlAdminLogsSelectLog").change(function() {
        globalLogSelection = $("#ddlAdminLogsSelectLog").val();

        alert(globalLogSelection);

        $.getJSON("/Administrative/AdminLogsChangeLogSelection", { NewSelection: globalLogSelection }, function(data) {
            if (data.Message == "Success") {
                globalCurrentPage = 1;

            } else if (data.Message == "Error") {
                //Do Something
            }
        });
    });

The alert is there to show me if it actually fired the change event, which it does.

Heres the method in the controller:

public ActionResult AdminLogsChangeLogSelection(String NewSelection)
    {
        String sMessage = String.Empty;
        StringBuilder sbDataReturn = new StringBuilder();

        try
        {
            if (NewSelection.Equals("Application Log"))
            {
                int i = 0;
            }
            else if (NewSelection.Equals("Email Log"))
            {
                int l = 0;
            }
        }
        catch (Exception e)
        {
            //Do Something
            sMessage = "Error";
        }

        return Json(new { Message = sMessage, DataReturn = sbDataReturn.ToString() }, JsonRequestBehavior.AllowGet);
    }

I have a bunch of Json requests in my application, and it seems to only happen in this area. This is a separate area (I have 6 “areas” in the app, 5 of which work fine with JSON requests). This controller is named “AdministrativeController”, if that matters.

Does anything jump out anyone as being incorrect or why the request would not pass to the server side?

  • 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-14T17:09:50+00:00Added an answer on May 14, 2026 at 5:09 pm

    As it turns out, if the Area name and Controller name are the same, it looks like MVC gets a little confused. Im not sure if this is a bug on my side, or something witH MVC, but when I remove the “/” from the name in the Json request (ie. “Administrative/Action” instead of “/Administrative/Action”) it works just fine. A colleague was the one to figure this one out for me, he found some forum response on it and showed me what they did. Once I removed the “/” it worked just fine.

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

Sidebar

Related Questions

I have a request that returns a JSON object with a single property which
I have one JSON that is coming in a string format. I need to
I have a JSON result that contains numerous records. I'd like to show the
Hi I have a JSON object that is a 2-dimentional array and I need
I have a JSON array with ActiveRecord objects. These objects can be reconstructed using
I have a JSON as follows { columns : [RULE_ID,COUNTRY_CODE], RULE_ID : [1,2,3,7,9,101,102,103,104,105,106,4,5,100,30], COUNTRY_CODE
I have two JSON objects with the same structure and I want to concat
Do Pagemethods and Json have security risks?(I dont use cookies).Forexample i have a pagemethod
So, I have a json file and I want to get the names of
I have created a json object from ruby with cobravsmongoose, however the attributes have

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.