Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We want to add a media picker in an .aspx page in a custom section. For this we added this line
<%@ Register Assembly="controls" Namespace="umbraco.uicontrols.TreePicker" TagPrefix="cc1" %>
<cc1:SimpleMediaPicker ID="DefaultMediaPicker" runat="server">
And its working fine means we can select the media using this mediapicker in custom section. But in the code behind the DefaultMediaPicker is null.
We want the media id in the button click. How we get it.Can anyonehelp me on this.
.aspx content seems right,
did you add a reference in your project to the controls.dll?
You need to be able to access DefaultMediaPicker.Value to get the id.
Might wanna check the designer file and see if the control is in there aswell.
Something like this:
( /// <summary>
/// DefaultMediaPicker control.
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
protected global::umbraco.uicontrols.TreePicker.SimpleMediaPicker DefaultMediaPicker;
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted