In this tutorial, you will learn how to get the action, controller and all the tag data directly out of the HTTP Context object. Querying the data directly from the request object should only when you have a very specific need. In my instance, I was implementing a partial fragment cache for all blocks that were accessed at the beginning on the page request life-cycle.

For anyone new to Episerver if you want to do this it is highly likely that you are doing something wrong. In most instances, Episerver provides will do all the routing in the background for you. For more information about how this works, I recommend reading, EPiServer 7 Routing For Dummies.

Creating a Custom HTML Helper, Custom Content Area Rendered, ContentRender

Within a controller you will have access to e HTML Helper. This is the main source of getting the information you need:

Getting Access To The Current Action Being Called

Getting Access To The Current Controller Being Called

Getting Access To The Current Tags Being Called

(Note: I have never got this working but it might help someone!)

In Your Controller

Getting Access To The Current Controller Being Called

Getting Access To The Current Tags Being Called