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 Access-Control-Allow-Origin. I know of two ways to get around this: JSONP and creating a custom HttpHandler to … Read more

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 exciting }); }); Of course, this works fine the first time the page is loaded, but when the UpdatePanel does a partial … Read more

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 some equivalent (hash table, Dictionary(Of String, Object), old-school StringDictionary–hell, a 2-D array of strings … Read more