November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using EPiServer.Web.PropertyControls;
using EPiServer.Web.PropertyControls.Adapters;
namespace EPiServerDemo.PropertyTypes
{
public class PropertyStringControlAdapter : PropertyDataControlAdapter
{
private const string PageNamePropertyName = "PageName";
private Label lblMessage;
public override void CreateEditControls()
{
base.CreateEditControls();
if (this.Name.Equals(PageNamePropertyName))
{
//Adding a message beside the PageName property
lblMessage = new Label();
lblMessage.Text = "Note: Please keep PageName short";
lblMessage.Font.Italic = true;
Control.Controls.Add(new LiteralControl(" "));
Control.Controls.Add(lblMessage);
}
}
}
}
You also need to add the following to your AdapterMappings.browser file
If you want to override the complete behavior of the control (not just adding a message), you need to create and add the control yourself (remove call to base.CreateEditControls()) and override ApplyChanges() to save the value (see SDK for sample code).