Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Dynamically selecting the region to use

I have defined five main regions in my framework, each representing different layout styles. Is it possible to dynamically select which region to use? In other words, instead of I'd like to write something like I have tried using server-side tags as examplified above, and I have tried to specify the region to use in the code-befind file on the page_load event as well as on the Init event, but nothing seems to work. Suggestions?
May 26, 2006 13:01
Hi Bjørn, I think the content/region replacement is by necessity performed really early during the initialization of a page. I have not attempted what you are suggesting, but have you looked into using multiple frameworks rather than switching design by selecting a certain region? If you were to place your 5 different layouts in 5 different frameworks, you can use the EPiServer ContentFrameworkSelector web control to allow some/all of your page templates to support some/all of these different frameworks... That way you could specify in detail how each page type should appear in each of the different layouts. "A normal page in layout A should send X content to region A1 and Y content to region A2 (in framework A)." "A normal page in layout B should send Z and W content to region B1 (in framework B)." Which layout/framework to use would be decided at runtime by the ContentFrameworkSelector control (I believe it can be based on information in the URL, personalized settings, etc).
May 30, 2006 14:11
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.