Skip to main content

All Questions

Tagged with
110 votes
15 answers
326k views

Download Excel file via AJAX MVC

I have a large(ish) form in MVC. I need to be able to generate an excel file containing data from a subset of that form. The tricky bit is that this shouldn't affect the rest of the form and so I ...
Valuk's user avatar
  • 1,616
132 votes
18 answers
394k views

Passing A List Of Objects Into An MVC Controller Method Using jQuery Ajax

I'm trying to pass an array of objects into an MVC controller method using jQuery's ajax() function. When I get into the PassThing() C# controller method, the argument "things" is null. I've tried ...
Halcyon's user avatar
  • 14.9k
299 votes
17 answers
179k views

jQuery UI Dialog with ASP.NET button postback

I have a jQuery UI Dialog working great on my ASP.NET page: jQuery(function() { jQuery("#dialog").dialog({ draggable: true, resizable: true, show: 'Transfer', hide:...
Paul's user avatar
  • 12.7k
121 votes
9 answers
528k views

Making a Simple Ajax call to controller in asp.net mvc

I'm trying to get started with ASP.NET MVC Ajax calls. Controller: public class AjaxTestController : Controller { // // GET: /AjaxTest/ public ActionResult Index() { return ...
chamara's user avatar
  • 12.7k
212 votes
9 answers
209k views

Prevent Caching in ASP.NET MVC for specific actions using an attribute

I have an ASP.NET MVC 3 application. This application requests records through jQuery. jQuery calls back to a controller action that returns results in JSON format. I have not been able to prove this, ...
JavaScript Developer's user avatar
68 votes
1 answer
62k views

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

I want to create two DropDownList 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 ...
CiccioMiami's user avatar
  • 8,196
8 votes
3 answers
17k views

ASP.NET MVC $.post call returning string...need help with format for jqGrid

I'm trying to dynamically populate a dropdown for the jqGrid when the user is editing data. I have it pretty much working however, there is one value in the dropdown call "undefined". I suspect this ...
dolphy's user avatar
  • 472
195 votes
11 answers
440k views

Accessing MVC's model property from Javascript

I have the following model which is wrapped in my view model public class FloorPlanSettingsModel { public int Id { get; set; } public int? MainFloorPlanId { get; set; } public string ...
Null Reference's user avatar
15 votes
7 answers
31k views

How do I build a JSON object to send to an AJAX WebService?

After trying to format my JSON data by hand in javascript and failing miserably, I realized there's probably a better way. Here's what the code for the web service method and relevant classes looks ...
Ben McCormack's user avatar
31 votes
2 answers
153k views

Rendering partial view on button click in ASP.NET MVC

The problem I will be describing is very similar to ones I already found (e.g. this post with nearly identical name) but I hope that I can make it into something that is not a duplicate. I have ...
InvisiblePanda's user avatar
92 votes
7 answers
127k views

How to post an array of complex objects with JSON, jQuery to ASP.NET MVC Controller?

My current code looks like the following. How can I pass my array to the controller and what kind of parameters must my controller action accept? function getplaceholders() { var placeholders = $(...
JSC's user avatar
  • 3,715
64 votes
13 answers
90k views

ASP.NET Calling WebMethod with jQuery AJAX "401 (Unauthorized)"

Been stuck with this for hours {"Message":"Authentication failed.","StackTrace":null,"ExceptionType":"System.InvalidOperationException"} I'm trying to call this WebMethod in my ASP.Net Webform [...
Daniel Cardenas's user avatar
29 votes
3 answers
65k views

Accessing Asp.net controls using jquery (all options)

How to access asp.net control using jquery <asp:TextBox runat="server" ID="myTextBox" /> $('#myTextBox') wouldn't work.
Venkata Krishna's user avatar
130 votes
12 answers
185k views

Pass array to mvc Action via AJAX

I'm trying to pass an array (or IEnumerable) of ints from via AJAX to an MVC action and I need a little help. the javascript is $.get('/controller/MyAction', { vals: arrayOfValues }, function (...
Dave's user avatar
  • 2,562
234 votes
19 answers
375k 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 ...
dkarzon's user avatar
  • 8,018

15 30 50 per page
1
2 3 4 5
81