User Controls in EPiServer

This is my first post about EPiServer, which basically is a framework for building web sites. It’s very capable and extensible and is in wide use in Scandinavia. For more information, look here:

Web User Controls in EPiServer solutions should always inherit from EPiServer.UserControlBase rather than the usual System.Web.UI.UserControl. This gives access to useful functions and properties such as

  • PageData GetPage(PageReference pageLink)
  • PageData CurrentPage
  • string Translate(string key)

Note that those functions work even if the current page is not a “proper” page type in EPiServer so it’s missing from the page hierarchy. Very useful!

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.