Accessing custom control using javascript on the client page.
-
I have been tasked with replacing some DOM and javascript with an ASP custom control. The aspx page is using master pages. What I need to do is access the custom control with javascript in the aspx page. The control and its C# code behind are working, but I need to access a listbox contained within the control. I seem to be unable to access the control at all. For example, in the aspx page I have the custom control like this:
;
In another page using an AJAX slider control, I have been able to access it like this:
var sliderUpdater = $find("SliderBehavior");
... then I am able to get and set properties for the slider. However, trying similar approaches with our custom control all results in returning null from the $find. Note: our control does not currently have any extenders or BehaviorID. I will post more code details if necessary. Any ideas, help, or links would be appreciated. Thank you.
-
I have been tasked with replacing some DOM and javascript with an ASP custom control. The aspx page is using master pages. What I need to do is access the custom control with javascript in the aspx page. The control and its C# code behind are working, but I need to access a listbox contained within the control. I seem to be unable to access the control at all. For example, in the aspx page I have the custom control like this:
;
In another page using an AJAX slider control, I have been able to access it like this:
var sliderUpdater = $find("SliderBehavior");
... then I am able to get and set properties for the slider. However, trying similar approaches with our custom control all results in returning null from the $find. Note: our control does not currently have any extenders or BehaviorID. I will post more code details if necessary. Any ideas, help, or links would be appreciated. Thank you.
Rico MNC wrote:
returning null from the $find
What ID are you using in the find? Don't forget about the name mangling that ASP.NET applies to IDs
only two letters away from being an asset
-
Rico MNC wrote:
returning null from the $find
What ID are you using in the find? Don't forget about the name mangling that ASP.NET applies to IDs
only two letters away from being an asset
-
Rico MNC wrote:
returning null from the $find
What ID are you using in the find? Don't forget about the name mangling that ASP.NET applies to IDs
only two letters away from being an asset