Try our conversational search powered by Generative AI!

How to use the built in properties in my own custom property




I'm currently trying to develop a custom property that can display a list of built-in EPiServer properties in EditMode.

I know the problems regarding saving the data once the fields are displayed but this should be possible to do.

My main problem is that I want to create a custom property which needs to display the propertydata fields from a different pagetype. But I do not want to save a page of this different pagetype as it probably will clutter the pages up...


Is it possible to do this - and how?! Every time I try to do this I get a null-pointer exception due to that CurrentPage is not set.

Feb 16, 2010 11:01


If I've understood what you want to do correctly, I would rather advice you not to do that. Properties should be tied to a pagetype no matter what.

Edited, Feb 16, 2010 16:52

Do you mean reusing controls like the one for selecting a page in EPiServer, inside your custom control?

Feb 16, 2010 22:38

Sounds like my Itera.MultiProperty

This is a way of grouping properties together and let them act as one property.
And a property shouldn't always be tied to a page type.. Dynamic properties aint!!!

And dynamic datastore will let us make property on the fly...

Feb 16, 2010 23:11

I have looked at the Itera.MultiProperty and it is very much alike that... but from what I can see from the code in coderesort they are not used native but wrapped. So yes Frederik - reuse controls.

And you are right - they should be tied to a pagetype, and that is actually also what I want, but I want to create a hidden page to tie the propertydatas to - so it is not the actual page that I'm editing, but another hidden page. I could probably do it by using an IFrame, but I'm not that fond of IFrame-solutions.


Feb 17, 2010 9:38

Couldnt one soluton be that to add yourself to the dataForm.Populate and add your own properties there based on you hidden page.
You could prefix those properties with pageID then you can attach yourself to the SavingPageEvent and remove those from that page and save them in the hidden page

Feb 17, 2010 10:41

I finally got it to work as I wanted... I just had to implement a class that inherit from System.Web.UI.WebControls.Panel (or what-ever at least a controlcontainer) and implemented EPiServer.Core.IPageSource - and then add the list of properties to this panel and it worked as it should...

Or at least it did for now ;-)

Edited, Feb 17, 2010 13:59
* 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.