Controller method not found error

Total Post:3

Points:21
C#
 478  View(s)
Ratings:
Rate this:

Hi Expert,

I can't able to send a request to the server through javascript code on checkbox click. Here is my code,

 $.post("Admin/UpdateUser", { userId: $(this).attr("id") }, function (response) {

            showMessage(response.message);
        })

Its raised error, Please give me some suggestion to accomplish my task.

  1. Post:44

    Points:310
    Re: Controller method not found error

    Hi Sophie,

    After analyzing your code, I think your path of controller causes the error. Please follow below line code to accomplish your task.

     $.post("../../Admin/UpdateUser", { userId: $(this).attr("id") }, function (response) {
    
                showMessage(response.message);
            })

    I hope its informative...

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!