40
votes
1answer
28k 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
16k 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
38k 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 ...
14
votes
6answers
11k 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: ...
5
votes
1answer
408 views

asp.net MVC and $.ajax added performance overhead

I have stumbled across a very curious issue of poor performance when asp.net MVC control is called by jquery $.ajax function. The control performs a database action that takes 403ms, but the total ...
5
votes
3answers
16k views

Pass a parameter to a controller using jquery ajax

I have created a view and a controller, the controller I am wanting to return some search results. I am calling the controller using jquery <input type="text" id="caption" /> <a ...
0
votes
1answer
4k views

JQuery Ajax call for PDF file download

My question is similar to Download and open pdf file using Ajax But not exactly the same , the reason I want an JQuery ajax is that my file is being generated dynamically from the data which would be ...
6
votes
3answers
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. ...
3
votes
2answers
2k views

ASP.NET MVC Partial view ajax post?

Index.html (View) <div class="categories_content_container"> @Html.Action("_AddCategory", "Categories") </div> _AddCategory.cshtml (PartialView) <script> ...
5
votes
3answers
4k views

Pass Date Values from Ajax Call to MVC

MY Ajax call $('#QuickReserve').click(function () { var now = new Date(); alert(now); //now = dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT"); var _data = { ...
4
votes
5answers
4k views

How to use $(this) inside MVC3 Ajax.ActionLink OnBegin,OnComplete Events

My Controller creates a list of links like this <ul id="MainMenu"> @foreach (var item in Model.MenuItems) { <li>@Ajax.ActionLink(item.Caption, item.ActionName, ...
4
votes
2answers
3k views

How to force form client-side validation in or before $.ajax()

I have a form and unobtrusive validations are enabled. By default in submit method client side validation gets triggered and (if you have any errors) the form looks like this: The validation ...
3
votes
3answers
2k views

Send data with jquery to an MVC controller

I have an ASP.NET MVC3 app and when the user clicks on my anchor tag, I want to send 3 pieces of data to an action: <a onclick='editDescription(<#= DocID,FileName,Description ...
2
votes
1answer
1k views

Session Cookies expiration handling in ASP.NET MVC 3 while using WIF and jquery ajax requests

I my project I'm using WIF (but this is not really important for the context of this question. You can use alternative framework which handles your authentication. Question is about dealing with ...

1 2 3 4 5
15 30 50 per page