Questions tagged [asp.net-mvc-ajax]

118 questions
0
votes
1 answer

The required anti-forgery form field __RequestVerificationToken is not present

Could you please help me to solve this issue? I'm implementing sign in form without form or html.beginform because I'm calling the controller /API through Ajax call and based on the status message / success, I want to redirect to some page as per…
0
votes
1 answer

Prevent page to navigate via MVC Ajax actionlink

I am using asp.net (model view controller) razor view Ajax action link to navigate through pages in my website. My requirement is i will have to restrict the user and populates some popups before navigating to different page and leaving to the…
user3369120
  • 63
  • 1
  • 11
0
votes
1 answer

How to create label text using html helper from Model in ASP.Net MVC 5 (Razor View)

I am trying to create a label text using html helper from my model RoomAvailabilitySummary View Design: @model IEnumerable @using(Ajax.BeginForm("RoomsAvail", new AjaxOptions …
Arjun
  • 403
  • 2
  • 8
  • 22
0
votes
1 answer

Ajax.RouteLink gives a 404

I have this link @Ajax.RouteLink("Bid", RouteNames.Ajax.BidOnLot, new { lotId = Model.Lot.Id, bidAmount = Model.NextBidAmountForUser }, new AjaxOptions { …
Sachin Kainth
  • 41,237
  • 78
  • 185
  • 289
0
votes
0 answers

call controller with plain javascript

how can I use pure javascript rather than jquery or any external library to call a controller in MVC controller public class SomeController : Controller { public ActionResult SomeMethod(string key, string value) { return this.Json(new…
user862226
  • 129
  • 2
  • 7
0
votes
0 answers

How to update multiple fields in a form in the OnSuccess Callback function of MVC Ajax

I am using MVC Ajax in my ASP.net MVC 2.0 web application. I am using Ajax.BeginForm() and passing an ajax request to update values in database. The Controller Action method for the ajax request is fired and i am returning multiple data values in…
Sai Avinash
  • 4,523
  • 16
  • 50
  • 93
0
votes
0 answers

unable to update Label.HiddenFor() content after the ajax request

In my Asp.net MVC 2.0 web Application. I am using an Ajax form . After the Sucessful Ajax , I am mentioning update target ID to update content of page with out completely refreshing it. In my View: <% using (Ajax.BeginForm("AjaxAdd", "Home", new…
Sai Avinash
  • 4,523
  • 16
  • 50
  • 93
0
votes
1 answer

Empty input didn't return added values

I have problem with my ajax-search. When I adding to my model some data, I go to my Index view, where I use my ajax-search. And then I erase text from input and submit form, Index view did not show added data. How to fix that?? It's my…
As Lk
  • 19
  • 1
  • 3
0
votes
2 answers

How to pass hidden field value from one view to another in asp.net mvc

I have parsed the json string and displayed it in the form of table and against each record I placed a "Edit" button. My code is : for (var i = 0 ; i < data.Homes.length ; i++) { results += "
" + data.Homes[i].ID + "" +…
0
votes
1 answer

How to display json string in the form of a table in asp.net mvc

I want to display a json string returned in the result of an ajax call in the from of a table. My ajax code is : var table = $('#PartnersTable'); $.ajax({ type: "GET", url: '@Url.Action("Get","Home")', …
Hammad Shahid
  • 1,996
  • 5
  • 26
  • 57
0
votes
2 answers

How to retrieve list of objects from controller using ajax in asp.net mvc

I want to retrieve list of objects from controller and pass it to the view using ajax. My controller's Get action's code is : public ActionResult Get() { Home h = new Home(); return View(h.get()); …
Hammad Shahid
  • 1,996
  • 5
  • 26
  • 57
0
votes
1 answer

Post Function in jQuery is not working

I am using Ajax function to add product in cart in MVC 3 In Ajax i have a function for adding product, inside that function i want to call a another function but its not working.. My Ajax function is var AjaxCart = { addproductvarianttocart:…
Avinash Singh
  • 2,527
  • 10
  • 38
  • 68
0
votes
1 answer

How to Add update panel in MVC 3

I am updating product Quantity by Update button, after clicking on update button page is reloading, instead of reloading that page i want to update that "cartUpdatePanel" table area only by Ajax My View is using (Html.BeginRouteForm("ShoppingCart",…
Avinash Singh
  • 2,527
  • 10
  • 38
  • 68
0
votes
1 answer

How to get the resulting JavaScript from AjaxOptions in ASP.NET MVC Framework?

I'm trying out ASP.NET MVC Framework and would like to create an ajax helper method. Basically this helper would act like ActionLink but without encoding its link text. It is rather trivial to write as an HtmlHelper, you simply have to write your…
Nicolas Buduroi
  • 3,429
  • 1
  • 26
  • 29
0
votes
1 answer

Asp.net MVC AJAX - How to access data by using AJAX?

Case: My application contains following modules Clients projects Business Contact etc Code of Clients Module using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using…