开发者

ScriptControl client id within a user control

开发者 https://www.devze.com 2023-02-18 13:08 出处:网络
I\'ve got a custom script control, or what I call a composite control with a client side object, that I\'m trying to use within a user control.The problem is the user control is changing the control i

I've got a custom script control, or what I call a composite control with a client side object, that I'm trying to use within a user control. The problem is the user control is changing the control id. So when I wire up the events with the code below the ids are wrong.

comboBox.OnClientLoad = "function(sender, eventArgs){" + Common.FindScriptObject(this.ClientID) + ".ComboBoxLoad(sender,eventArgs); }";

The Common.FindScriptObject code just outputs $find(''). Because it is being used within a user control the client side ids have an some extra lenght to them, like "usercontrol_co开发者_StackOverflowntrolclientId" vs "controlclientId". So how do I get the ids to be correct within a usercontrol?


the control needs to have been added to the control tree first.

0

精彩评论

暂无评论...
验证码 换一张
取 消