Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Greg 6 posts 26 karma points
    Jun 13, 2012 @ 05:29
    Greg
    0

    Adding mediaPicker to custom section.

    Hi,

    Today I am trying to add a mediaPicker to a custom section. I did this in my user control and it seems to work.

    private pagePicker contentPicker;
    private RelatedLinkMediaDataExtractor dataExtractor;
    DataTypeDefinition dataTypeDefinition1 = DataTypeDefinition.GetDataTypeDefinition(1035);
    mediaChooser _mediapicker = (mediaChooser)dataTypeDefinition1.DataType.DataEditor;
    Panel1.Controls.Add(_mediapicker); 

    However, my user control adds other user controls to it dynamically, and I actaully need to add the mediaPicker to a panel in my child control. Doing the same as above in my child control I get this:

    Seems to error out something somewhere, I can step through the code no problem. Any ideas?

     

  • Greg 6 posts 26 karma points
    Jun 13, 2012 @ 05:32
    Greg
    0

    Since it wont let me edit.. I am using umbraco 4.6.1

  • Greg 6 posts 26 karma points
    Sep 17, 2012 @ 22:54
    Greg
    0

    Recreated the doc type and seemed to work again. Didnt do anyhting special

Please Sign in or register to post replies

Write your reply to:

Draft