asp.net - Selecting elements in a usercontrol using JavaScript -


I have a web form that has a user control and I want to be able to access HTML elements in user control <<> document.getElementById ('<% = usercontrol.clientid% & gt;')

but it has Zero returned.

I was seen with firebug all around and found that in the usercontrol, the tag clients present with such usercontrolid_myelement. I am feeling that something like this can work:

  document.getElementById ('<% = usercontrol.clientid%>' + '_ myelement')   

Is there a better / better way to do this?

I have seen with your mental powers through your question!

Your problem is that your server letter in your home page can not access the ASP.NET elements of your usercontrol.

Solve the solution elements, or just the client elements of the elements you need, through properties in the user's properties. So you can use ClientIDs in Javascript as you want.

Comments