How can i get hidden control id in parent page in the user control page using javascript. there is a hidden input control in the page. i want to assign value to this control in the user control page which is used in this page. its an ascx page control.
<input type="hidden" runat="server" name="isChanged" id="isChanged" value="0" />
You could do this using jquery using the ‘ends with’ selector.
This assumes you only have one input on your page with an id which ends in ‘isChanged’. The reason we use ends with is because asp will make the client side id of your control something like ct100$placeholder1$mypanel$isChanged.
A more robust solution would be to have a property on your usercontrol (eg ‘ClientIdOfHiddenField’) that you set from your parent page on page_load
then in the markup of your user control you can have