+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / MediaContentSelectorView, how to get results in backend?

MediaContentSelectorView, how to get results in backend?

7 posts, 0 answered
  1. Vitaly
    Vitaly avatar
    11 posts
    Registered:
    20 Jun 2010
    07 Feb 2011
    Link to this post
    Hello,

    I used MediaContentSelectorView as an image selector:

    <sf:MediaContentSelectorView
        id="selectorView"
        runat="server"
        ContentType="Telerik.Sitefinity.Libraries.Model.Image"
        ParentType="Telerik.Sitefinity.Libraries.Model.Album"
        LibraryBinderServiceUrl="~/Sitefinity/Services/Content/AlbumService.svc/"
        MediaContentBinderServiceUrl="~/Sitefinity/Services/Content/ImageService.svc/"
      MediaContentItemsListDescriptionTemplate="Telerik.Sitefinity.Resources.Templates.Designers.Libraries.Images.ImageItemDescriptionTemplate.htm"
        DisplayResizingOptionsControl="false"
        ShowOpenOriginalSizeCheckBox="false">
    </sf:MediaContentSelectorView>

    How can I restrict selecting one image only and see what this image id is in the backend?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Feb 2011
    Link to this post
    Hi Vitaly,

    Please take a look at this post.

    Kind regards,
    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
  3. Vitaly
    Vitaly avatar
    11 posts
    Registered:
    20 Jun 2010
    07 Feb 2011
    Link to this post
    Yeah, I saw it, but it deals with client script and not backend script. Although may be I'm missing something, but I just need id of selected image in the backend (after postback).
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Feb 2011
    Link to this post
    Hello Vitaly,

    Create a property of your control and set the selected image ID to this property inside the client component.
    The build-in selector works with client side API.

    Kind regards,
    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
  5. Vitaly
    Vitaly avatar
    11 posts
    Registered:
    20 Jun 2010
    07 Feb 2011
    Link to this post
    Hmm, I'm not really sure how do I set backend property from client script? Could you please provide me with some example code?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Feb 2011
    Link to this post
    Hello Vitaly,

    In your custom class which uses the selector, you can add a public property of type string. Then you can get the property in the designer directly  this.get_controlData();

    Greetings,
    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
  7. Vitaly
    Vitaly avatar
    11 posts
    Registered:
    20 Jun 2010
    07 Feb 2011
    Link to this post
    I'm sure what does it have to do with server code though? Can u post a code for this? Basically I have a ASP.NET web page with control, I need to have selected image id in the backend after postback.
7 posts, 0 answered