Questions tagged [asp.net-mvc-ajax]

118 questions
0
votes
1 answer

mvc2 with ajax table enabling back button

I have created my application that has search form and below contains results for the search. Now i want to be able to add history, button back functionality. The problem is i am caught in infinitive loop of loading page and i am not sure why, this…
cpoDesign
  • 8,060
  • 11
  • 56
  • 98
0
votes
1 answer

Is it possible to pass a generic model to a JsonResult action from an ajax call?

I'm creating a javascript function that will invoke ajax call to validate the model of a form. function ValidateModel(formID) { $.ajax({ url: '/Custom/ValidateModel', type: 'POST', data: $('#' + formID).serialize(), …
devspider
  • 211
  • 4
  • 12
0
votes
0 answers

Passing multiple ajax parameters to mvc controller

I can pass a serialized form to a mvc controller no problems with code below and all is populated $("#btnExecuteJob").on("click", function (e) { var frmForm1 = $("#form1").serialize(); $.ajax({ cache: false, url:…
Carl
  • 1
0
votes
0 answers

jsp ajax call throwing 500 (Internal Server Error) - after uploading published files to Website Hosting

I have a MVC with SQL Database with EF connectivity. I am performing a ajax operation to get data from 2 tables on SQL and performing a math and returning a JSON result. This works fine when I run the program in local system with local data base…
0
votes
0 answers

dynamic form ajax beginform validation error - MVC

Implementation Detail: Page has Add Button and Table view On Add button click, partial view (form) is loaded on Modal PopUp. Dynamic form selected based on parameter. On Add button click below code is used to bind the partial view form to div …
0
votes
1 answer

Preventing Execution on Child and Ajax Requests

we are using asp.net mvc-3 for our application. we populate a property of controller from db on initialize method of controller. i don't want this code to be executed on partial requests and ajax requests. is there some way i can achieve this…
Muhammad Adeel Zahid
  • 16,658
  • 13
  • 86
  • 147
0
votes
1 answer

Multiple response from server within a Ajax call in ASP.Net MVC 5

What will be the possible ways to send multiple responses to the client side within a Ajax call. Scenario 1.Import 200 records from excel through Ajax. 2.Read file record one by one. 3.On each iteration I need to send some data to client side and…
0
votes
1 answer

MVC: When returning from the controller on Ajax call, the result is undefined

I'm making an Ajax call to the controller when clicking on a Kendo button and return the model: @(Html.Kendo().Button() .Name("btnSubmit") .HtmlAttributes(new { type = "button" }) …
0
votes
2 answers

Ajax value not received by controller

I have this code that got properly delivered to its controller counterpart. but for some reason the search model data was only nulls,while the pageNumber is received properly did i made a mistake somewhere? $("#NextResult").click(function () { …
0
votes
0 answers

Ajax begin form db record with mvc

I created a form. I want to do a post save method. He records but records the same data twice. How can I solve this problem? I have to solve the double registration problem. I'm pushing the button once. When I go through Debug step by step, it goes…
yuksel
  • 71
  • 1
  • 12
0
votes
0 answers

How to pass dynamic data as model from view to controller

I am using Ajax MVC to submit the model to controller, In View I am displaying the data from a API like below code: @using (Ajax.BeginForm("SaveFeaturesCapabilities", "Estimates", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "step-3" }))…
Developer
  • 857
  • 5
  • 17
  • 39
0
votes
2 answers

Knockout viewmodel passed to action coming empty

I have a controller action where I'm trying to post a model from knockout: [HttpPost] public void AddItems(MyViewModel model) { [...] } knockout action: self.AddItems = function (data, event) { var url =…
nickornotto
  • 1,466
  • 2
  • 29
  • 55
0
votes
1 answer

Asp.net MVC page refresh sing AJAX

I am working on asp.net MVC , here i have used highcharts that will display data coming from a meter. Data is coming after every 15-20 seconds so i want to reload/refresh the page after every 15/20 seconds using ajax. How can i accomplish this…
user6856823
0
votes
1 answer

what is the alternative of using url.action in ajax

E.g. @url.Action("Actionname", "ControllerName", new { id=@item.id, @class="test"}) I want such a thing in Ajax, like this: @Ajax.action("Actionname", "ControllerName",new { id=@item.id, @class="test"}) I tried this, but it did not benefit me: …
Amgad Mohamed
  • 145
  • 4
  • 14
0
votes
1 answer

Excel file reading in mvc5 using javascript function

The Excel sheet want to read while it upload on a button click in MVC5.The uploaded excel file name is passed into action using AJAX method.Here the file variable get null value in posted method. Here how can pass selected file as HttpPostedFileBase…