Retrieve image in code behind
I am using "ButtonSelector" to pick an image in my custom module, but I don't know how to retrieve the image in code behind. What I need is to display the image on the page after selecting an image from library. Thanks.
<
sfLib:ButtonSelector
WindowNavigateUrl
=
"~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx"
ItemTemplatePath
=
"~/Sitefinity/Admin/ControlTemplates/Events/Dialogs/ButtonSelector.ascx"
AssociatedControls
=
"Story_Photo"
runat
=
"server"
cssclass
=
"pickerWrapper"
ButtonText
=
"Upload"
/>
Hi Stephen,
1. You should add a custom metakey - User Manual( page 213)
2. Inside your public control you should have an image control which has the same ID as your metakey name.
3. The ButtonSelector returns dynamic link, so in the code behind you should resolve the dynamic link as shown in this post.
Best wishes,
Ivan Dimitrov
the Telerik team