0

Is it possible to dynamically set the view base type for a partial view?

I'm doing a lot of dynamic page generation, using custom IViewFolder and IViewFile implementations, and need to set a specific base type for certain views...it's not a problem injecting the correct block, I just need to know what block to inject.

I've tried:

<use pageBaseType=”MyCustomViewType” /> 

at the top of the partial view, but it doesn't get picked up...is that the right syntax? Is it even possible...?

Thanks in advance,

Kieron

Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
Kieron
  • 26,748
  • 16
  • 78
  • 122
  • As far as I understand partial views (< use file=""/>) are compiled into the main view and do not have their own page/base type. If you need this, make convention to use ; - i.e. specific variable to be passed to partial; this can be of any type. – queen3 Jul 12 '10 at 10:46
  • That sounds like it could work, are there any examples floating about that you know of? – Kieron Jul 12 '10 at 10:49

1 Answers1

0

Unfortunately, the answer to this was no!

Kieron
  • 26,748
  • 16
  • 78
  • 122