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

Forums / Developing with Sitefinity / Image & Generic Content Controls in User Control

Image & Generic Content Controls in User Control

4 posts, 0 answered
  1. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    09 Dec 2009
    Link to this post
    I would like to create a custom user control that I could drop onto my page that has the ability to interact with the image libary to select an image and also one that has a Generic Content control so that I can just click on edit.  Any suggestions on how to get started?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    09 Dec 2009
    Link to this post
    Hi medicalwebgeek,

    For the first control that interacts with Image Library you can use Image Selector. As for the Generic Content control - it cannot be wrapped as a User Control. You can use RadEditor. You may find the following KB useful- How to wrap a Generic Content control in 3.6 SP1 (it applies for 2.7 version as well).

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. WebGeek
    WebGeek avatar
    186 posts
    Registered:
    20 Dec 2006
    10 Dec 2009
    Link to this post
    Thanks - I also used this forum post for help:
    http://www.sitefinity.com/support/forums/sitefinity-3-x/developing-with-sitefinity/getting-an-image-url-from-the-imageselector-webeditor.aspx

    How can I obtain the height & width of the image as well as it's alt text?

    Thanks again for your speedy response.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Dec 2009
    Link to this post
    Hi medicalwebgeek,

    Width, Height, AlternateText are metadata of a IContent object. You can use content.GetMetaData method to access the width, height, alt text.


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered