Sourabh Dhiman

Sourabh Dhiman

  • 1.3k
  • 445
  • 10.4k

POST method not call.

May 16 2023 9:35 AM

Hello everyone I have faced an issue I have call a ajax with razor .net core. 

  public void OnGet()  This is my GetFunction
        {
        }

I have called this function by ajax It's called successfully. But I have called a Public void OnPost() not called this by ajax.

 $.ajax({
                type: "POST", -- Not Called
                url: "/Shared/_Partial?handler=InsertEmailBlastDetails",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                data: record,
                success: function (data) {

}
           

 $.ajax({
                type: "GET", -- Called
                url: "/Shared/_Partial?handler=InsertEmailBlastDetails",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                data: record,
                success: function (data) {

}

        


Answers (6)