40
votes
1answer
27k views

Easiest way to create a cascade dropdown in ASP.NET MVC 3 with C#

I want to create two dropdown lists in a cascade using MVC3 (preferably Razor) with C#. I would like to have one dropdown where you can choose the year and another one where you can choose a specific ...
26
votes
3answers
15k views

ASP.NET MVC Ajax Error handling

How do I handle exceptions thrown in a controller when jquery ajax calls an action? For example, I would like a global javascript code that gets executed on any kind of server exception during an ...
25
votes
5answers
12k views

Handling session timeout in ajax calls

I'm making an ajax call using jquery to an asp.net mvc controller action: [AcceptVerbs(HttpVerbs.Post)] public ActionResult GetWeek(string startDay) { var daysOfWeek = ...
22
votes
4answers
36k views

Proper way to use AJAX Post in jquery to pass model from strongly typed MVC3 view

I'm a novice web programmer so please forgive me if some of my "jargon" is not correct. I've got a project using ASP.NET using the MVC3 framework. I am working on an admin view where the admin will ...
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
4answers
3k views

MVC 3 - Html.EditorFor seems to cache old values after $.ajax call

This is a follow on from the following question: MVC 3 + $.ajax - response seems to be caching output from partial view There is a detailed description of the problem over there. However, I have ...
13
votes
6answers
10k views

Stupid IE prompts to open or save json result which comes from server

Internet explorer in compatibility mode gets the data from the server in an ajax callback method, and pops-up a dialog if I want to save the data or open. How to get rid of that? client says: ...
9
votes
2answers
16k views

Render Partial View using Jquery Ajax with variable data

I have already read this post, but I am not sure know to make it work taking data from the user. Here is the ajax jquery I am using. I know (or at least think) that this cant render a partial. But it ...
9
votes
4answers
10k views

Why does Ajax.BeginForm replace my whole page?

Context: Asp.Net MVC3 w/Razor I am trying to put a login form on a Razor layout (formerly master page) so that, when the user times out, s/he can be prompted to login without being redirected (as in ...
9
votes
2answers
11k views

KnockoutJS, updating ViewModel after ajax call

I am using Knockout and the Knockout Mapping plugin. My MVC3 Action returns a View and not JSON directly as such I convert my Model into JSON. This is a data entry form and due to the nature of the ...
8
votes
6answers
1k views

Response code 401 triggering basic authentication before the jquery ajax error handler

I have a scenario where I have to handle authentication of ajax requests using "Forms Authentication". Based on some search and help from my earlier stackoverflow post, I had decided to use the method ...
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 ...
6
votes
2answers
5k views

Valums file-uploader doesn't work under Internet Explorer 9

Valums file-uploader (now called Fine Uploader) doesn't work under Internet Explorer 9 but wors fine under Chrome. So under IE it shows the name of the file and button CANCEL and no % of uploading. ...
6
votes
1answer
2k views

How to return correct response on error in ASP.NET MVC 3.0 via JSON?

I'm struggling to resolve this problem. On my local machine (Win7/VS2010/IIS 7.5) and another identical developer's machine, the following code returns the 500 status code, and the response text says ...
5
votes
5answers
2k views

Calling a C# method with jquery

I am trying to call a method with jQuery on a button click.This is waht I have so far: $("a.AddToCart").click(function () { var link = document.URL; $.ajax({ ...

1 2 3 4 5 47
15 30 50 per page