Ben Foster 7/6/2012

Content negotiation in ASP.NET MVC

Read Original

This technical article details implementing content negotiation in ASP.NET MVC, allowing a single controller action to return data in multiple formats (HTML, JSON, XML) based on the client's HTTP Accept headers. It discusses using an [AutoFormatResult] attribute, compares approaches with ASP.NET Web API, and shows how to create custom formatters like one for Partial Views.

Content negotiation in ASP.NET MVC

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week