Amita Palkar - Junnarkar
How we can achieve Ajax method call using MVC
By Amita Palkar - Junnarkar in AJAX on Mar 23 2018
  • Kalyani Shevale
    Dec, 2018 27

    $.ajax({type: 'POST',url: '@Url.Action("PipeLogic", "Survey")',data: { listQuize },success: function (response) {window.location.href = urldata;if (response != null) {alert("Question Piped");}else {alert("Question Not Piped");}},error: function (response) {}});

    • 1
  • Bidyasagar Mishra
    Jul, 2019 11

    1. $.ajax({type: 'POST',url: '@Url.Action("PipeLogic", "Survey")',data: { listQuize },success: function (response) {window.location.href = urldata;if (response != null) {alert("Question Piped");}else {alert("Question Not Piped");}},error: function (response) {}});

    • 0
  • Disha Raval
    Jun, 2018 12

    Use a Razor to dynamically change your URL by calling your action like this:$.ajax({type: "POST",url: '@Url.Action("ActionName", "ControllerName")',contentType: "application/json; charset=utf-8",data: { data: "yourdata" },dataType: "json",success: function(recData) { alert('Success'); },error: function() { alert('A error'); } });

    • 0
  • Sankara Krishnan Venugopal
    Apr, 2018 28

    Its first calling the FirstAjax action with default HttpGet request and renders the blank Html view . (Earlier you were not having it) later on loading of DOM elements of that view your Ajax call get fired and displays alert. Thanks!

    • 0
  • Jaipal Reddy
    Apr, 2018 3

    A simple ajax call using mvc is, @Ajax.ActionLink("Get User Details", "GetDetails", new AjaxOptions { UpdateTargetId = "divGetAllUsers", HttpMethod = "GET", OnSuccess = "fnSuccess", })

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS