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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:29:51+00:00 2026-06-15T13:29:51+00:00

I ma using jQuery Ajax request to filter a webgrid and I have several

  • 0

I ma using jQuery Ajax request to filter a webgrid and I have several webgrids and several ajax requests. Each Ajax request calls the same ActionResult method but passes different parameters. The idea is the correct method is called based on the parameters I supply. However this doesn’t.

I get this error:

The current request for action 'FilterGrid' on controller type 'UserManagerController' is ambiguous between the following action methods:<br>System.Web.Mvc.ActionResult FilterGrid(Int32, Int32, System.String, System.String, Int32, System.String) on type UserManager.Controllers.UserManagerController<br>System.Web.Mvc.ActionResult FilterGrid(System.String) on type UserManager.Controllers.UserManagerController

My jQuery

 function filterGrid() {
        var filters = getFilterVals();
        $.ajax({
            url: '@Url.Action("FilterGrid", "UserManager")',
            type: "POST",
            async: true,
            dataType: "html",
            data: "group=" + filters.group,
            success: function (data) {
                $('#webgrid-wrapper').empty().html(data);
            },
            error: function (data) {

            }
        });
    }

My Controller code

[HttpPost]
public ActionResult FilterGrid(int alf, int brad, string username, string group, int isactive, string email)
{

    List<UserManager.Models.vw_UserManager_Model> modelList = DAL.getGridUsers(alf, brad, username, group, isactive, email);

    switch (alf)
    {
        case 1:
            Session["chkBoxAlf"] = 1;
            break;
        case 0:
            Session["chkBoxAlf"] = 0;
            break;
    }

    switch (brad)
    {
        case 1:
            Session["chkBoxBrad"] = 1;
            break;
        case 0:
            Session["chkBoxBrad"] = 0;
            break;
    }

    switch (isactive)
    {
        case 1:
            Session["chkBoxIsActive"] = 1;
            break;
        case 0:
            Session["chkBoxIsActive"] = 0;
            break;
    }

    Session["txtFilterUsername"] = username;
    Session["txtFilterGroup"] = group;
    Session["txtFilterEmail"] = email;

    return PartialView("~/Views/Partial/_WebGridUserManagerUsers.cshtml", modelList);
}

[HttpPost]
public ActionResult FilterGrid(string group)
{
    return PartialView("~/Views/Partial/_WebGridUserManagerGroups.cshtml");
}

My breakpoint for

 [HttpPost]
        public ActionResult FilterGrid(string group)
        {
            return PartialView("~/Views/Partial/_WebGridUserManagerGroups.cshtml");
        }

Doesn’t get hit. Does anyone know how to solve this?

  • 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-15T13:29:52+00:00Added an answer on June 15, 2026 at 1:29 pm

    You can’t have two method POST with the same name because the framework don’t know which to call.
    But you can configure ActionName:

    [ActionName("MethodName")]
    public ActionResult Filter(string group){}
    

    and in your ajax you call ~/Controller/MethodName

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

Sidebar

Related Questions

I am getting data dynamically using jQuery AJAX requests. The Ajax calls are nested,
I am executing an AJAX request using jQuery as such: $.get({ url: 'run_program.php', data:
I am making a simple ajax request using jquery . Below is my ajax
I'm using jQuery to setup an Ajax request that grabs an XML feed from
I'm trying to do an AJAX request using Jquery. The JS file is located
I am using JQuery UI plugin blockUI to block UI for every ajax request.
I'm trying to implement authentication using jquery to make an ajax request to a
I'm using JQuery 1.7.2, trying to do a cross site Ajax request which should
im using jquery to make ajax requests. is it possible to detect if the
I am trying to make two ajax requests in parallel using jQuery like this:

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.