Tagged Questions
33
votes
3answers
18k views
ASP.NET MVC 3 (Razor) Ajax.ActionLink - What am i doing wrong?
Trying to have a AJAX action link which when clicked, should do a HttpGet to an action method which returns a PartialViewResult and shoves the HTML into a div.
Here's my View:
<div ...
17
votes
4answers
9k views
MVC3 Unobtrusive Validation Not Working after Ajax Call
Ok, here is the deal, I have seen a few posts on SO relating to this issue, but nothing is working for me.
Basically, I have select drop downs that are being loaded from partial views, I am trying ...
17
votes
5answers
2k views
Commonly-accepted approach in MVC for form within jQuery dialog
There seem to be several ways to integrate jQuery dialogs with ASP.NET MVC. Has a specific approach emerged as the commonly-accepted best-practice way to do so?
As an example: I have a list page ...
15
votes
5answers
20k views
jQuery returning “parsererror” for ajax request
Been getting a "parsererror" from jquery for an Ajax request, I have tried changing the POST to a GET, returning the data in a few different ways (creating classes, etc.) but I cant seem to figure out ...
14
votes
3answers
6k views
Correct way to handle Ajax calls in ASP.Net MVC 3
When coding up Ajax calls in ASP.Net MVC we have a lot of options as far as issuing calls, handling them on the server, and dealing with successes and failures on the client. Some things clearly have ...
14
votes
2answers
8k views
ASP.NET MVC 3 - Ajax.BeginForm vs jQuery Form Plugin
I'm starting a new ASP.NET MVC 3 project and am going to implement some screens that are read only by default but allow the user to edit information by clicking on an Edit button. I want these screens ...
11
votes
1answer
14k views
jquery ajax forms for ASP.NET MVC 3
this might be an easy question but for me right now it is not clear and I have to get things sorted in my head... maybe somebody can help me with that =)...
I know that MVC comes with Ajax Helpers.
I ...
10
votes
1answer
2k views
How do I pass correct Url.Action to a JQuery method without extra ampersand trouble?
I am trying to make an ajax call like so:
$('#Grid').load('@Url.Action("_AgentStatesGrid", "AgentStates", new { projectId = Model.SelectedProject, siteId = Model.SelectedSite })', null, ...
9
votes
2answers
17k views
Master-Detail Sample Code for MVC 3 Razor (using Ajax for details)
I am looking for sample code to create a master/details with c# mvc 3.
Specifically, I am trying to figure out how to call via ajax the rendering of a partial view. I am able to put the partial view ...
9
votes
1answer
870 views
ASP.NET MVC - What does IsAjaxRequest() actually mean?
I had previously created a method on my base controller:
public bool IsJsonRequest()
{
var acceptTypes = Request.AcceptTypes;
return acceptTypes != null &&
...
8
votes
2answers
16k views
Posting array of JSON objects to MVC3 action method via jQuery ajax
Does the model binder not suport arrays of JSON objects? The code below works when sending a single JSON domain object as part of the ajax post. However, when sending an array of JSON domain objects, ...
8
votes
5answers
14k views
“UpdatePanel” in Razor (mvc 3)
Is there something like UpdatePanel (in ASPX) for Razor?
I want to refresh data (e.g. table, chart, ...) automaticly every 30 seconds.
Similar to clicking the following link every 30 seconds:
...
8
votes
2answers
1k views
How to create a default AjaxOptions for Razor Views?
How do I create a default AjaxOptions? For example, I have a menu with some links, I want to make the entire website to use the same loading element and same error handling.
@Ajax.ActionLink("Home", ...
7
votes
5answers
6k views
Can I return custom error from JsonResult to jQuery ajax error method?
How can I pass custom error information from an ASP.NET MVC3 JsonResult method to the error (or success or complete, if need be) function of jQuery.ajax()? Ideally I'd like to be able to:
Still ...
7
votes
4answers
8k views
How do I pass this js array to my MVC 3 controller?
I am getting null values in the controller. Not sure what am I am missing.
I have a grid where I have a list of guests (with name & email) where user select guest by checkbox.
Then I read name ...