Control Designer, setting image src issue
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();
applyChanges
() function?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
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-
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