Questions tagged [asp.net-ajax]

A set of extensions to ASP.NET developed by Microsoft for implementing Ajax functionality.

5281 questions
848
votes
22 answers

How can I deserialize JSON to a simple Dictionary in ASP.NET?

I have a simple key/value list in JSON being sent back to ASP.NET via POST. Example: { "key1": "value1", "key2": "value2"} I AM NOT TRYING TO DESERIALIZE INTO STRONGLY-TYPED .NET OBJECTS I simply need a plain old Dictionary(Of String, String), or…
richardtallent
  • 34,724
  • 14
  • 83
  • 123
486
votes
18 answers

jQuery $(document).ready and UpdatePanels?

I'm using jQuery to wire up some mouseover effects on elements that are inside an UpdatePanel. The events are bound in $(document).ready . For example: $(function() { $('div._Foo').bind("mouseover", function(e) { // Do something…
Herb Caudill
  • 50,043
  • 39
  • 124
  • 173
438
votes
11 answers

ASP.NET MVC controller actions that return JSON or partial html

I am trying to create controller actions which will return either JSON or partial html depending upon a parameter. What is the best way to get the result returned to an MVC page asynchronously?
NathanD
  • 8,061
  • 7
  • 30
  • 26
222
votes
15 answers

Setting Access-Control-Allow-Origin in ASP.Net MVC - simplest possible method

I have a simple actionmethod, that returns some json. It runs on ajax.example.com. I need to access this from another site someothersite.com. If I try to call it, I get the expected...: Origin http://someothersite.com is not allowed by…
Kjensen
  • 12,447
  • 36
  • 109
  • 171
163
votes
9 answers

How can I convince IE to simply display application/json rather than offer to download it?

While debugging jQuery apps that use AJAX, I often have the need to see the json that is being returned by the service to the browser. So I'll drop the URL for the JSON data into the address bar. This is nice with ASPNET because in the event of a…
Cheeso
  • 189,189
  • 101
  • 473
  • 713
81
votes
9 answers

Rebinding events in jQuery after Ajax update (updatepanel)

I have several input and option elements on my page, each (well almost) have an event attached to update some text on the page once they change. I use jQuery which is really really cool :) I also use Microsofts Ajax framework, utilizing the…
Per Hornshøj-Schierbeck
  • 15,097
  • 21
  • 80
  • 101
74
votes
5 answers

How do I force full post-back from a button within an UpdatePanel?

How do I force full post-back from a button within an UpdatePanel?
Andre Pena
  • 56,650
  • 48
  • 196
  • 243
72
votes
5 answers

How to have a javascript callback executed after an update panel postback?

I'm using a jQuery tip plugin to show help tips when the user hovers certain elements of the page. I need to register the plugin events after the page is loaded using css selectors. The problem is I'm using an ASP.NET Update Panel and after the…
tsbnunes
  • 1,003
  • 2
  • 10
  • 11
65
votes
31 answers

Sys is undefined

I have an ASP.Net/AJAX control kit project that i am working on. 80% of the time there is no problem. The page runs as it should. If you refresh the page it will sometimes show a javascript error "Sys is undefined". It doesn't happen all the…
James
62
votes
2 answers

Are MicrosoftAjax.js, MicrosoftMvcAjax.js and MicrosoftMvcValidation.js obsolete as of ASP.NET MVC 3?

Are MicrosoftAjax.js, MicrosoftMvcAjax.js and MicrosoftMvcValidation.js obsolete as of ASP.NET MVC 3? I haven't been able to find much info on this on the web, but from what I've read it implies that these files were used in ASP.NET MVC 1-2, and…
Jake Petroules
  • 23,472
  • 35
  • 144
  • 225
62
votes
3 answers

ASP.NET MVC modal dialog/popup best practice

I am looking for the most standard way to achieve modal dialogs in ASP.NET MVC. An example of what I am trying to do is when I select an item from my "list" page, I want the "details" page to be a popup over the list and NOT a new page. I'm not…
Brian David Berman
  • 7,514
  • 26
  • 77
  • 144
55
votes
16 answers

Disable asp.net button after click to prevent double clicking

I have an ASP.NET button that I need to disable after the user clicks it to prevent double-clicking. Once the submit completes it has to be enabled again. Can anyone help me with this?
Goutham
  • 1,051
  • 3
  • 10
  • 8
49
votes
7 answers

One Update Panel vs. Multiple Update Panels

I have an ASP.NET web page that displays a variety of fields that need to be updated best on certain conditions, button clicks and so on. We've implemented AJAX, using the ASP.NET Update Panel to avoid visible postbacks. Originally there was only…
mattruma
  • 16,589
  • 32
  • 107
  • 171
46
votes
8 answers

Serialize Entity Framework objects into JSON

It seems that serializing Entity Framework objects into JSON is not possible using either WCF's native DataContractJsonSerializer or ASP.NET's native JavaScript serializer. This is due to the reference counting issues both serializers reject. I have…
Program.X
  • 7,250
  • 12
  • 49
  • 83
46
votes
8 answers

How to post ASP.NET MVC Ajax form using JavaScript rather than submit button

I have a simple form created using Ajax.BeginForm: <% using (Ajax.BeginForm("Update", "Description", new { id = Model.Id }, new AjaxOptions { UpdateTargetId = "DescriptionDiv", HttpMethod = "post" },new {id ='AjaxForm'…
mfloryan
  • 7,667
  • 4
  • 31
  • 44
1
2 3
99 100