Browsing All Posts filed under »asp.net MVC«

Extending ViewResult in asp.net MVC 2

April 21, 2011

0

I recently needed to return JSON and HTML from the same controller method. One way to handle this is to extend ViewResult and create a new Custome result. Here is a good and nearly complete example. There are a couple of extra steps you need to take to get this example working, as follows. 1.) Extend Controller […]