Showing posts with label asp.net-mvc. Show all posts
Showing posts with label asp.net-mvc. Show all posts

Monday, June 11, 2012

jQuery Ajax calls and the Html.AntiForgeryToken()


I have implemented in my app the mitigation to CSRF attacks following the informations that I have read on some blog post around the internet. In particular these post have been the driver of my implementation

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.

Sunday, June 10, 2012

grid controls for ASP.NET MVC?


If you are using ASP.NET MVC how are you doing grid display? Rolled your own? Got a library from somewhere?

Sunday, June 3, 2012

What is the right pattern for using JQuery Ajax and ASP.Net Mvc?


I'm very new to both the Mvc framework as well as JavaScript and JQuery. I'm trying to understand the right way to structure Ajax calls.

Thursday, May 24, 2012

How to format a JSON date?


I'm taking my first crack at Ajax with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this:

Sunday, May 20, 2012

Abuse of C# lambda expressions or Syntax brilliance?


I am looking at the MvcContrib Grid component and I'm fascinated, yet at the same time repulsed, by a syntactic trick used in the Grid syntax :

Friday, May 18, 2012

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?

Thursday, May 17, 2012

ASP.NET MVC JsonResult Date Format


I have a controller action that effectively simply returns a JsonResult of my model. So, in my method I have something like the following:

Sunday, May 13, 2012

IE9 throws exceptions when loading scripts in iframe. Why?


Precondition:



I have an aspx-page with iframe inside. This iframe points to the url handled by MVC on the same site (it's hybrid site, both standard ASP.NET and ASP.NET MVC). The resulting page rendered by MVC contains a lot of scripts references.

Thursday, April 5, 2012

ASP.NET MVC and AJAX


I have a view which is composed of top, left and bottom headers and a main contents pane. Suppose that during an AJAX request I need to update the HTML of the top, bottom and main panels (the left header should stay the same).

Tuesday, January 31, 2012