Try our conversational search powered by Generative AI!

Render pages in ContentArea (Webforms)



I've seen a lot of guides on how to render pages in ContentAreas in MVC but I can't find any guides on how to do that in Webforms. Is there an easy way to do that?

Jul 15, 2014 13:55


Have you installed the Visual Studio Tools? There are templates for partial controls.

Basically you create a new user control and inherit from ContentControlBase. Then you can decorate the user control with the TemplateDescriptor attribute, e.g.:

    Inherited = true, 
    AvailableWithoutTag = true)]
public partial class NewsArticleTeaser : ContentControlBase
Jul 15, 2014 16:53

Thank you! Exactly what I was looking for :)

Jul 16, 2014 11:56
If you use [TemplateDescriptor()] as mentioned above you can also control where the pages are allowed to be rendered as well by using Tags = string []  {"YourTagName"} 
Then you use RenderSettings on your episerver:property-webcontrol to set the tag name as well
Jul 16, 2014 12:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.