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
Hi,
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">
</cc1:SimpleMediaPicker>
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.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.TreePicker.SimpleMediaPicker DefaultMediaPicker;
)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
get media id from simple media picker in aspx page
Hi,
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">
</cc1:SimpleMediaPicker>
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.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.TreePicker.SimpleMediaPicker DefaultMediaPicker;
)
is working on a reply...