Click here to Skip to main content
11,575,921 members (55,958 online)
Rate this: bad
good
Please Sign up or sign in to vote.
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.
Posted 10-Sep-12 21:27pm
Edited 10-Sep-12 21:32pm
Ankur\m/50.2K
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 305
1 F-ES Sitecore 145
2 OriginalGriff 125
3 Abhinav S 98
4 Dave Kreskowiak 80
0 OriginalGriff 705
1 Sergey Alexandrovich Kryukov 600
2 Abhinav S 438
3 F-ES Sitecore 410
4 Suvendu Shekhar Giri 365


Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100