Gal Segal's Blog

Thoughts of a programmer with a soul

Posts Tagged ‘mvc3’:

Sep 21

MVC Routing Legacy URLs

Tags: ,


When moving a web application from WebForms to MVC framework I found sometimes “.aspx” and “.ashx” URLs from the old website sniking into my new clean and carved URLs. This issue can be addressed specifically by targeting the relevant “aspx” URLs and redirecting to a desired place, but it can get a bit messy. I found a more generic way of doing so by creating a new “Legacy Route” that will redirect all legacy requests to the new home page

Continue reading...
Sep 14

MVC Output Cache With Cache Profiles

Tags: ,


MVC and Output Cache are a good match, and since MVC3 this match is even better. But there are some occasions where this match is not good enough. I recently discovered an unwelcome behavior when dealing with ajax and had to come up with a solution.

Continue reading...
Mar 10

MVC Nested Layout

Tags: ,


MVC3 introduced Razor’s Layout as the new heir of the master page. It is a little different, has section rendering instead of content place holders, but it is pretty similar and intuitive to work with.

Continue reading...
Feb 28

ASP.NET MVC Global Error Filter Attribute

Tags: ,


ASP.NET MVC3 introduced the global filters, allowing developers to register a filter across all controllers and action once – typically in “Application Start” event in the Global.asax. This feature can be used to perform a “catch all” place for all application errors.

Continue reading...