Get a control's value that is in usercontrol using javascript

Posted by flopdix on Stack Overflow See other posts from Stack Overflow or by flopdix
Published on 2010-05-28T18:23:45Z Indexed on 2010/05/28 19:02 UTC
Read the original article Hit count: 158

Filed under:

I have a user control that i have registered to an aspx page. Now from the aspx page, i am trying to access one of the registered usercontrol's hiddenfield value in my aspx page using javacript using the below code:

tst = document.getElementById('control1$hdnField').value;

I looked into the page's trace, and i could see 'control1$hdnField'. Then why i am not getting its value in my aspx page. I have also ensured that the hidden field exits on the user control and has a default value set.

Please help.

© Stack Overflow or respective owner

Related posts about ASP.NET