title: MVC HTML Helper, get parent view of current partial view
body: <p>I am writing an Html extension to render partial views dynamically (view name/path is provided by CMS at runtime).</p>
  
  <p>Within my extension I need to determine the name or path to the outermost view containing the partial in the case where a view contains a partial contains another partial contains yet another partial- I need to learn the identity of the parent view.</p>
  
  <p>Within the extension method I know I can get the immediate parent through the HtmlHelper.ViewDataContainer property.  That tells me the context of the the currently executing extension. What I need to be able to do is iterate up to its parent view if there is one.</p>