skip to Main Content

Jquery – Problem in sending data to the controller through Ajax in ASP.NET MVC

I use this foreach: foreach (var item2 in RItem.GetChildItems(item.ID_Ca)) { <div id="@idc" class="accordion-collapse collapse" aria-labelledby="headingTwo2" data-bs-parent="#accordionExample"> <div class="accordion-body" style="background: white; padding: 5px; padding-left: 20px;"> <button id="getthis" data-id="@item2.Name_Ca" type="button" onclick="Search()" style=" color: #0028ff; font-size: 14px;"> @item2.Name_Ca </button> </div> </div> } When…

VIEW QUESTION

Laravel AJAX error 419 (unknown status) (Even though has CSRF token)

POST http://127.0.0.1:8000/admin/upload/services 419 (unknown status) CSRF token mismatch Even though it has csrf token, it still has error 419 (unknown status) CSRF token mismatch ................................. $.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); /* Upload file */ $("#upload").change(function(){ const form =…

VIEW QUESTION

Jquery – nginx CORS Policy fail

When I try to GET request from my front end project I am getting this error Access to XMLHttpRequest at 'http://10.3.0.112:41052/operations' from origin 'http://10.3.0.112:5488' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No…

VIEW QUESTION
Back To Top
Search