Users Pricing

forum

Home Forums When sending jQuery post to MVC controller getting 404 error – MindStick

When sending jQuery post to MVC controller getting 404 error

Anonymous User 2343 21 May 2015

I'm sending from view using jQuery to MVC post action

function DoSomething(passedId) {
                    $.ajax({
                        method: "POST",
                        dataType: 'text',
                        url: '/MyController/SomeAction/',
                        data: { id: passedId }
                    }).done(function (data) {
                        //                       
                    });
                }

And inside MyController

[HttpPost]
public ActionResult SomeAction(int id)
{
       ...
}

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md