More in this section

Forums / General Discussions / Retrieve image in code behind

Retrieve image in code behind

2 posts, 0 answered
  1. Stephen
    Stephen avatar
    70 posts
    Registered:
    09 Jun 2009
    25 Oct 2010
    Link to this post
    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" />
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Oct 2010
    Link to this post
    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
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered