More in this section

Forums / General Discussions / Control Designer, setting image src issue

Control Designer, setting image src issue

4 posts, 0 answered
  1. mario
    mario avatar
    23 posts
    Registered:
    08 Aug 2011
    04 Oct 2011
    Link to this post
    Hi team!

    I'm having an issue at the moment I set the ImageSrc of an <asp:ImageButton> control in a UserControl Designer.js

    the issue is that when the controlData.SrcImagen value haven't been changed, even when the image is a new one (but with the same name) the backend doesn't show the new image

    },
        applyChanges: function () {
            var controlData = this._propertyEditor.get_control();
            controlData.Link = jQuery(".DropLinkPages option:selected").val();
            controlData.SrcImagen = "~/UserControls/ucBannerImg/imgBanner.jpg"; //jQuery("#SrcImagen").val();
            controlData.LboxWidth = jQuery("#LboxWidth").val();
            controlData.LboxHeight = jQuery("#LboxHeight").val();
            controlData.LinkTarget = jQuery("#LinkTarget").val();       
        },
        get_controlData: function () {
            return this.get_propertyEditor().get_control();

    ¿How can I force the backend updates the image of the ImageButton after the applyChanges() function?

    Thanks in advance
  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    18 Sep 2017
    07 Oct 2011
    Link to this post
    Hi Mario,

    You have a correct applyChanges: function ()so I think the issue is caused by the duplicated ID`s (LboxWidth, LboxHeight, LinkTarget). Can you test with changing the ID`s of the duplicated controls?

    All the best,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. mario
    mario avatar
    23 posts
    Registered:
    08 Aug 2011
    04 Nov 2011
    Link to this post
    Hi Stanislav


    I encounter this issue again, and still can't solve it
    Can you explain me what you mean with "Duplicated ID's" ... to me; the ids are different.


    thanks
    -mario-
  4. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    18 Sep 2017
    09 Nov 2011
    Link to this post
    Hello Mario,

    Can you check with this applyChanges() element of your designer controlData.LboxWidth = jQuery("#LboxWidth").val();
    do you have set public string LboxWidth { get; set; } in Template_Name.ascx.cs and in Page_Load LboxWidth.Text(or Image or ImageMap depends on the type of control you created) = LboxWidth; Also can you put a breakpoint in the start of applyChanges function to see if the script tries to apply changes and what is causing the problem if no change is applied.

    Best wishes,
    Stanislav Velikov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered