AI OnAI Off
public class PropertyLongStringControlAdapter : PropertyDataControlAdapter
in the example. Compile, and then go to admin and create custom property. Then I add that custom property to some page or as a dynamic property. But when I go to edit and try to display it in edit mode to set value I get:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
EPiServer.DataAccess.DynamicPropertiesDB.Load(PageReference pageLink) +1219
EPiServer.DataAbstraction.DynamicProperty.ListForPage(PageReference pageLink) +95
EPiServer.UI.Edit.EditDynProp.OnInit(EventArgs e) +43
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692
Note that when I start the solution in debug mode (F5), none of the breakpoints ever gets hit within the property code.
'EPiServer.Core.PropertyData.CreateChildControls(string, System.Web.UI.Control)' is obsolete: 'CreateChildControls is no longer used. Use CreatePropertyDataControl to create a control instead.'
But I cannot find CreatePropertyDataControl in Epi5 namespaces, in SDK doc nor using reflector. What should I do? Also, there are warnings when overriding CreateChildControls method, that it is obsolete. How should be plugins implemented now?