All Questions
1,216 questions
110
votes
15
answers
330k
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 ...
132
votes
18
answers
399k
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 ...
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:...
121
votes
9
answers
537k
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 ...
212
votes
9
answers
213k
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, ...
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 ...
199
votes
11
answers
448k
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 ...
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 ...
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 ...
31
votes
2
answers
155k
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 ...
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 = $(...
65
votes
13
answers
93k
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
[...
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.
130
votes
12
answers
186k
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 (...
234
votes
19
answers
382k
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 ...