Questions tagged [asp.net-mvc-2]

The evolution of the ASP.NET MVC platform continued with the release of ASP.NET MVC 2, which was later succeeded by the more advanced ASP.NET MVC 3 version.

ASP.NET MVC2 JsonResult: Sorry, this request has been denied

Although this question may sound familiar, I just can't seem to get over it. This section pertains to my Controller Action: public JsonResult AddToCart(int pId, int qty = 1, int optVal = 0) { AjaxActionResult response = new AjaxActionResult(); respon ...

JQuery UI button causing an error in Internet Explorer related to "potentially harmful Request.Form value"

While testing my application with Internet Explorer, I discovered that buttons styled with JQuery UI button are sending their entire content to the server. This causes a "A potentially dangerous Request.Form value was detected from the client" error in ASP ...

The dropdown list in the edit form of jQgrid is displaying an additional quotation mark

In my MVC2 EditStatesController, I have the following code: public JsonResult GetStates() { string statesToReturn = GetStates(); // returns "1: Alabama; 2: Alaska; 3: Arizona; 4: Arkansas" return Json(statesToReturn); } ...

Utilizing Ajax for populating a cascading selection menu

Currently, I am in the process of dynamically changing the options in a drop-down list using ajax and jquery by fetching data from a database. With jquery, I can easily clear and add new options to the drop-down. However, my issue arises when attempting to ...

Transferring data between View and Controller in MVC version 2

I'm often puzzled by the best method for passing values between Views and Controllers in MVC. While I understand that I can set ViewData in the Controller and access it in the View, I struggle with how to pass values back from the View to the Controller. ...

Generating HTML within controller actions

I am struggling to make a decision on whether it is acceptable to generate HTML in controller actions and return this HTML to AJAX calls from my view using jQuery. For example, when choosing a client through jQuery Autocomplete, in addition to retrieving ...

Why doesn't the browser redirect even though Fiddler is indicating otherwise?

The 'Execute' function is triggered by XmlHttpRequest. $.ajax( { async: false, url: 'Task/Execute/1' }); The 'Execute' function initiates a redirect ...

Implementing ASP MVC3 - Utilizing partial views to dynamically add new HTML elements to the webpage

Currently, I have implemented an Ajax call in my ASP MVC3 view to add a new list item to the page dynamically. The process involves making an Ajax call from the view to a controller action that returns a partial view. The jQuery script is then set to use t ...

Basic Selenium Test Triggers XMLHttpRequest ERROR : 404

I am currently using selenium-rc with C# to conduct tests on my asp.net mvc2 application. At the moment, my test only involves opening the home page using selenium RC. When running the test, I notice that the selenium remote control opens in a browser and ...