I have a web user control which contains 'AssociatedLableId' property and a label.
<uc1:UC id="uc1" run="Ser" AssociatedLableId="lblLable" />
and added a Label and a button in aspx page and registered User Control .
Now when I click the button then the text of label control of aspx page assigned to label control of web user control using JS.
I tried following but not right.
<asp:button id ="btn" run="Ser" text="Click" onClientClick="return assignValue();" />
function assignValue()
{
document.getElementById('UserControlsAssocitedControlId').value = document.getElementById('aspxPageLableId').value;
}
AssociatedLableId
property is used to get the Id of aspx page's Label control.
I can find the Id of
UserControlsAssocitedControlId
but how can I find the
aspxPageLableId
which I assigned in the
AssociatedLableId
property in JS.